Hello
I am using the combobox in DataGrid Filter Row.
See the code:
{
field: 'type',
type: 'combobox',
limitToList: true,
options: {
panelHeight: 'auto',
data: [{
value: '0',
text: '-'
}, {
value: '1',
text: 'შეკვეთა'
}, {
value: '2',
text: 'ჯარიმა'
}, {
value: '3',
text: 'ხელფასი'
}, {
value: '4',
text: 'ბონუსი'
}, {
value: '5',
text: 'კორექცია'
}],
valueField: 'value',
textField: 'text',
onChange: function(newValue, oldValue){
if (newValue == '') {
dg.datagrid('removeFilterRule', 'type');
} else {
dg.datagrid('addFilterRule', {
field: 'type',
op: 'equal',
value: newValue
});
}
dg.datagrid('doFilter');
}
}
},
When I use keyboards to navigate through combobox items with keyboard to select an item, the DataGrid Filter sends double request to the server, firstly the value of the item and then the text of the item.
What can I do to fix this?
I think, the request to the server should only be made when either an item is selected from the combobox or when the typed text matches one of the items' text from the combobox.
Thank you in advance!