adminjs icon indicating copy to clipboard operation
adminjs copied to clipboard

feat(filter): add support for more operators than contains

Open roggervalf opened this issue 10 months ago • 5 comments

When filtering data, by default, default-type component generates urls where records are going to be filtered by attribute using contains operations. This pr provides a way to choose different operators and reflect that in the url. Operators are: startsWith, endsWith, equals, notEquals and contains (default) operators. Or operator is supported too. Screenshot 2025-03-17 at 1 15 41 a m Updates were added to these adapters as well:

roggervalf avatar Mar 05 '25 07:03 roggervalf

pls @dziraf when you get some time to take a look

roggervalf avatar Mar 08 '25 14:03 roggervalf

This is a good start but ideally the entire filter system should be rebuilt to allow AND, OR and NOT plus we should use symbols for operators. This would also require us to update all adapters to make sure the app works the same regardless of your ORM/ODM/database

dziraf avatar Mar 13 '25 07:03 dziraf

This is a good start but ideally the entire filter system should be rebuilt to allow AND, OR and NOT plus we should use symbols for operators. This would also require us to update all adapters to make sure the app works the same regardless of your ORM/ODM/database

hey @dziraf, I added this functionality into adapters and covered the other operators that you mentioned. Pls when you get some time

roggervalf avatar Apr 25 '25 03:04 roggervalf

Having support for multiple operators would be really useful. It adds flexibility to how we filter data and makes the component much more versatile in different use cases.

Visot avatar May 06 '25 16:05 Visot