omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
262 stars 114 forks source link

This pull request fixes per-column searches. #120

Closed vaibhavpandeyvpz closed 4 years ago

vaibhavpandeyvpz commented 4 years ago

Though this fixes column searches for me, it's still to be reviewed by the maintainer if it affects any other adapter as well.

curry684 commented 4 years ago

@shades684 yours to check 😉

curry684 commented 4 years ago

@vaibhavpandeyvpz can you look at the open conversations? @shades684 can you review it?

shades684 commented 4 years ago

I'm fine with the solution as is.

In the long run we should have a different and more generic solution. I'd rather have some sort of callback per column if it's searchable so we can have the user extend the query.

What I'm missing in the current solution is: What happens if we have a datefield and we search for the string 20. Is 1-1-2000 valid or maybe 1-1-1920.

The solution that's defined here isn't generic (it's opinionated), but it solves/fixes a problem.

curry684 commented 4 years ago

Ok :)

jkabat commented 4 years ago

I agree with @shades684 - possibility to have column filter with callback option would solve advanced requirements such as date range search and so on.