KnpPaginatorBundle icon indicating copy to clipboard operation
KnpPaginatorBundle copied to clipboard

Filter on partial terms with LIKE '%term%' operator

Open PhasecoreX opened this issue 2 years ago • 1 comments

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

When filtering, I would like to be able to filter on partial text. I see that the query generated looks like:

... WHERE p0_.name LIKE 'term'

I'd like an option for it to automatically insert percent signs, like:

... WHERE p0_.name LIKE '%term%'

I looked through the documentation, I didn't see anything like this.

Also, it seems that when submitting a filter term, if the user manually includes a % or _, it will affect the LIKE operator. Seems like these should be escaped by default, but I can see it being useful not escaped as well. Thought I'd bring it up anyway.

PhasecoreX avatar Aug 10 '23 21:08 PhasecoreX

The filter functionality only offers some basic features. For any advanced needs, you should implement your logic and use the paginator only to paginate

garak avatar Sep 11 '23 09:09 garak