Quantcast
Viewing all articles
Browse latest Browse all 82149

fully custom filtering

I want to implement fully-custom filtering, but as far as I can tell the only custom filtering options are hamstrung in strange ways:

- I can implicitly change the behavior of per-column filtering by modifying the value that standard filtering sees (ofnSearch), but standard filtering logic still applies to the resulting string
- I can add a fully custom row-based filter (afnFiltering), but it has serious flaws: it's global, so it won't work easily for multi-table pages, and it's in addition to the standard filtering, so if I want to replace the standard filtering I need to disable and replace the entire input element.

What I really want to do is provide my own mapping from search input text to filtering function. That is, I convert the search string to a function which returns true or false when applied to each row, just like the afnFiltering functions but NOT global and INSTEAD of the standard filtering.

I'd be happy to implement this as a plugin, but from reading the code I can't find any suitable extension points. I think what I want is a way to intercept _fnFilterCreateSearch and perhaps also to disabuse _fnFilter of the assumption that longer search strings are more restrictive.

Are there any pointers you can give me?

Thanks!

Viewing all articles
Browse latest Browse all 82149

Trending Articles