Hi Anshul,
Greetings from Syncfusion support.
Query: How to disable filter button on grid filter
menu.
Based on your query, we understand that you want to
disable the filter button until a user types something in the input field.
Please refer the below code and sample for your reference.
[app.component.ts]
actionComplete(args) {
if (args.requestType
== 'filterafteropen') {
args.filterModel.dlgObj.btnObj[0].element.setAttribute('disabled', 'true')
document.getElementsByClassName('e-flmenu-input')[0].addEventListener('input',
(args) => {
console.log(args.target['value']);
if (args.target['value']
== "") {
this.grid.element.getElementsByClassName('e-flmenu-okbtn')[0].setAttribute('disabled',
'true');
} else {
this.grid.element.getElementsByClassName('e-flmenu-okbtn')[0].removeAttribute('disabled');
}
})
}
}
|
Sample: https://stackblitz.com/edit/angular-fbxsmi-knwfyv?file=src%2Fapp.component.html
API: https://ej2.syncfusion.com/angular/documentation/api/grid/#actioncomplete
Regards,
Vinitha
Balasubramanian