-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Binding an input's textInput to the table's filter property is very useful for incremental filtering. However, it may result in unnecessary processing of intermediate user input.
For example, suppose you are bound to a list of 10K city names, and the user type in "Tokyo". On each keystroke ('T', 'o', 'k', and so forth) , the filter is re-evaluated which can be costly, especially on weaker machines.
In such cases it may be desirable to throttle changes to the filteredRows computed property. Fortunately, KO makes this extremely easy and it boils down to a single extend call. The desired throttling interval could be provided in the DataTable constructor (if not specified, no throttling will take place).
Deprecated API (for older KO versions): http://knockoutjs.com/documentation/throttle-extender.html
Current API: http://knockoutjs.com/documentation/rateLimit-observable.html