-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need raw filter term #2475
Comments
This caused problems for me as well until I started searching through the code and saw that I just needed to use the escaped searchTerm in a RegExp constructor rather than doing any kind of substring matching. Previously, my workaround was to strip backslashes from |
That would be fine if one's goal was to do exactly what the grid code does with filters, but the whole point of a custom filter is to do something different. Possibly extremely different. The whole idea of extensibility is recognizing that you can't predict everything that will make sense for everyone and every possible application's data. Maybe I want '@' to be a wildcard. Maybe I want to append '5' to every 'k' in the filter. Whatever it is, providing the raw input from the user is essential for permitting customization. |
I can also mark this as a future enhancement, and happy to accept a pull request that adds this functionality. At the moment the (quite small) development team are focusing their time on stability and reaching an initial release of 3.0, not new functionality. |
We have provided the ability to define custom filter widgets and custom filter behaviour. I think this should meet the needs here. |
When implementing a custom filter, the search term is modified before being provided to the filter function. These modifications make it difficult or impossible to implement desired filtering logic.
There needs to be some way to get the "raw" term that the user typed in. I think this should be the default behavior for all custom filters, but an option like "filterRaw:true" might be fine if needed for compatibility.
The text was updated successfully, but these errors were encountered: