How to show only certain operators in filters Panel
this is my code:
const app = new Container({
layout: 'hbox',
appendTo: 'container',
items: {
grid,
splitter: {
type: 'splitter'
},
filtersPanel: {
type: 'panel',
cls: 'filters-panel',
title: 'Filters',
collapsible: true,
collapsed: true,
layout: {
type: 'vbox',
align: 'start'
},
flex: 1,
maxWidth: '35em',
items: {
enableAllCheckbox: {
type: 'checkbox',
text: 'Enable/disable all',
checked: true,
listeners: {
change: ({ checked }) => checked ? app.widgetMap.filterPickers.activateAll() : app.widgetMap.filterPickers.deactivateAll()
}
},
filterPickers: {
type: 'gridfieldfilterpickergroup',
width: '100%',
ref: 'filterPickers',
// Provide our Grid's store & columns as the list of properties available for filtering
grid,
// From the available set of columns in grid.columns, only allow these in the filter property drop-downs
allowedFieldNames: ['optionName', 'optionTypeName', 'libraryName','manufacturerName'],
//filters: [{
// id: 'permanent-filter-1',
// property: 'optionName',
// operator: 'includes',
// caseSensitive: false
//}],
listeners: {
change: ({ filters }) => {
console.log("In", filters);
//grid.store.filter(filters);
// Save filters to localStorage when they change
localStorage.setItem(FILTERS_STORAGE_KEY, JSON.stringify(filters));
}
},
//canDeleteFilter,
//getFieldFilterPickerConfig
}
}
}
}
});