Trigger an event before filtering

Trigger an event before filtering

RagingTrollRagingTroll Posts: 34Questions: 3Answers: 0

It would be great if an event like 'preSearch' is triggered before filtering takes place (in the _fnFilterComplete function), in case we have a custom filter that needs something cached in order to filter each row.

Example for the preSearch event: fetch all input values from a form and save the values for row filtering.

This question has an accepted answers - jump to answer


  • allanallan Posts: 54,700Questions: 1Answers: 8,555 Site admin
    Answer ✓

    in 1.10.1 (soon to be released) I've added a couple of extra parameters to what is sent to the custom filtering function: source.

    Of particular interest is the last parameter, the list counter. So now what you can do in your filtering function is simply add if ( counter === 0 ) { ... } and do the init logic there. That way your customer filter code is still self contained.


This discussion has been closed.