Hi,
How can we reset the tbar filters externally.
I would like to reset the textfield based on some external trigger.
ts file
onFilterByChange(event) {
this.filterBy = event.value;
//trying to reset textfield in this function
}
binded the events by
this.calendar.widgetMap['filterBy'].on(
'change',
this.onFilterByChange,
this
);
this.calendar.widgetMap['filterText'].on(
'change',
this.onFilterTextChange,
this
);
config file
tbar: {
items: {
filterBy: {
items: ['Chair', 'Title'],
value: 'Title',
label: 'Filter by',
weight: 600,
type: 'combo',
triggers: {
filter: {
align: 'start',
},
},
ref : 'filterByFieldRef'
},
filterText: {
type: 'textfield',
value:'',
icon: 'b-fa b-fa-filter',
weight: 600,
placeholder: 'Enter text',
clearable: true,
keyStrokeChangeDelay: 100,
triggers: {
filter: {
align: 'start',
cls: 'b-fa b-fa-filter',
},
},
style: { width: '40em' },
},
},
},