In ig gird filter feature.It sends a request to load data when I input each charachter.
This approach can introduce performance issue. Can I make it load data only when I press Tab or Enter?
Hi,
Actually filtering is not triggered on each character input, but on time interval which can be set by filterDelay option. By default it is set to 500 ms, but you can increase that interval.
We don't have out of the box functionality which triggers filtering on specified key press. This can be achieved by custom code. The steps are:
1.Set filterDelay option to very high interval, so it will not trigger filtering.
2.Hook to each column filter keydown event and listen for Enter/Tab key.
3.When Enter/Tab key is pressed call the igGridFiltering.filter method.
4.(Bonus step) Cancel the filtering which will be triggered by default after filterDelay time elapses.
I've implemented sample which demonstrates this functionality for simple filtering.
Here is the interesting code:
You can find the whole sample attached to this post.
Hope this helps,
Martin Pavlov
Infragistics, Inc.