How to catch dropdown selection changes in ui-grid. I've customised 'ui-grid/dropdownEditor' like this
var customCellTemplate = '<div><form name=\"inputForm\"><select ng-class="\'colt\' + col.uid" ui-grid-edit-dropdown ng-model=\"MODEL_COL_FIELD\" ng-change="vm.onDropdownChange(row)" ng-options=\"field[editDropdownIdLabel] as field[editDropdownValueLabel] CUSTOM_FILTERS for field in editDropdownOptionsArray\"></select></form></div>'
Added ng-change="vm.onDropdownChange(row)" in ui-grid/dropdownEditor but onDropdownChange event not fired.
And my controller looks like this
function Controller(){
vm.onDropdownChange = onDropdownChange;
vm.gridOption.columnDefs = [
{
field: 'staus', displayName: 'Status', editableCellTemplate: customCellTemplate, width: '20%',
cellFilter: status filter, editDropdownIdLabel: 'status_id', editDropdownValueLabel: 'status', editDropdownOptionsArray: statusArray
},
{
//Other fileds
}];
function onDropdownChange(row){
}
}
Please tell me where i'm going wrong and how to accomplish this functionality.