Skip to content


Filter widget: callback function / event when started/completed #108

oozrafa opened this Issue · 7 comments

4 participants


An event is needed for the filter widget so that functions can be passed when the filter starts and when it ends.

Two examples of uses of this:

  1. To show a spinner when filtering because it can take some time on very large tables.

  2. I have a 'total' table foot and would like to update it accordingly - ie, recaculate the total for rows which are visible (match the filtered values).


I'm doing a lot of work to the filter widget, and I have already included a filterEnd callback. But I haven't added a filterStart event yet. What do you plan on passing to the filter widget? Or will the information be modified?

I also have implemented a method to trigger a search. Maybe this would work better instead of a filterStart callback?


My 2 current use cases are as follows:

  1. I have a very large table (10,000 rows) and filtering a column can take some time. To the user it seems as if nothing is happening, or that the page is stuck. So when the filter starts I'd like to show a notification that something is happening, and remove the notification when the filtering has completed. So for me it's not really passing anything to the filter widget, but know when it starts and when it finishes.

  2. I have a table when one of the columns has a number in each row, and at the bottom of the table I have a table foot with the total for that column. I need to be able to run a function when the filtering is complete in order to update the 'total' cell with new total for only the visible rows. So here I don't really care when it starts, but only when it finishes.


Actually, since I'm already working on the filter widget, I'll do both - add the "processing icon" and the callbacks :)

In the next update, I've been trying to improve the speed of the filter widget, so hopefully it will speed up a bit for you :)


wow, great! Really good job!

@oozrafa oozrafa closed this
@oozrafa oozrafa reopened this

Ah great, I'll be needing the filterEnd callback too. Really like your project!


idea for pager look/layout,


Version 2.4 now has filterInit, filterStart and filterEnd events. See the docs on how to use them.

I've also added a processing icon - I'm not happy with it since it doesn't seem to animate the icon, but it works - using these events. You can enable it using the new showProcessing option.

@Mottie Mottie closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.