PDA

View Full Version : Filtered data disappears after a while in extjs grid



vmnelectron
22 Jun 2017, 9:40 PM
0down votefavorite (https://stackoverflow.com/questions/44712797/filtered-data-disappears-after-a-while-in-extjs-grid?noredirect=1#)


I implemented a Filter with three options (ONLINE, OFFLINE, BREAK) to choose from a particular grid column. I applied this value in grid store filter by calling supervisorUserStore.filter('reason', ‘OFFLINE’); But after the grid refresh, the filtered data is visible and stays for only 1 second in the grid. Then the parent checkbox is automatically selected in that filter checkbox and all the data disappears in the grid. How to make the filtered data always be available after the grid refresh?
Below is the code to filter for that particular column in that grid.

filter: {
active: false,
type: 'list',
options: [
{ id: 'NORMAL', text: 'NORMAL'},
{ id: 'TIMEOUT', text: 'TIMEOUT'},
{ id: 'BREAK', text: 'BREAK'}
],

property: 'loggedIn',
listeners: {
click: function(record, eOpts, filter, data,selected){
supervisorUserStore.clearFilter(true);
supervisorUserStore.filter('reason', record.selected[0]);
Ext.getCmp('suUserGrid').getView().refresh();

}
}