Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debounce for filter input #1232

Closed
don-bluelinegrid opened this issue Nov 1, 2016 · 2 comments
Closed

Debounce for filter input #1232

don-bluelinegrid opened this issue Nov 1, 2016 · 2 comments

Comments

@don-bluelinegrid
Copy link

don-bluelinegrid commented Nov 1, 2016

@ceolter

Niall,

I noted in this issue about a year and a half ago, someone was requesting the ability to add a delay in the key events in the filter input - basically asking for a debouncing function:
#272

Was anything more done, aside from the option of the explicit "Apply" submit button?

I am going to need to use debouncing, so could use your guidance on how to do this. Where is the appropriate point to intercept the key event, before it notifies the grid to call getRows()? Is the filterChangedCallback useful for this? Or should it be done in the key event listener?

This will be for use with remote server data/filtering.

Any guidance appreciated.

Regards,
Don

@ceolter
Copy link
Contributor

ceolter commented Nov 7, 2016

i haven't worked on debounce for the filter, and it's currently not on my stack.

with guidance - the filters are not designed with this in mind - so no point of extensions. what you would need to do is copy the filter, and then hack it in your self. the built in filters can be found here:
https://github.com/ceolter/ag-grid/blob/master/src/ts/filter/textFilter.ts
https://github.com/ceolter/ag-grid/blob/master/src/ts/filter/numberFilter.ts
https://github.com/ceolter/ag-grid-enterprise/tree/master/src/setFilter

@ceolter ceolter closed this as completed Nov 7, 2016
@don-bluelinegrid
Copy link
Author

@ceolter

Thanks, Niall. I had ended up using the example filter in the documentation as a starting point, and have created a custom filter, and have integrated the npm debounce module into the filter input change.

Thanks,
Don

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants