feat(filter): add support for more operators than contains#1750
feat(filter): add support for more operators than contains#1750roggervalf wants to merge 8 commits intoSoftwareBrothers:masterfrom
Conversation
|
pls @dziraf when you get some time to take a look |
package.json
Outdated
| "homepage": "https://github.com/SoftwareBrothers/adminjs#readme", | ||
| "dependencies": { | ||
| "@adminjs/design-system": "^4.1.0", | ||
| "@adminjs/themes": "^1.0.1", |
There was a problem hiding this comment.
added as when using example repo https://github.com/SoftwareBrothers/adminjs-example-app fails when this package is linked and this package failed because this dependency does not exist
There was a problem hiding this comment.
This will result in a circular dependency issue because adminjs is a peer dependency of @adminjs/themes. adminjs-example-app is also an outdated repository.
Local linking issue can be solved by linking @adminjs/themes in your local app and in local adminjs
There was a problem hiding this comment.
good to know, I'll remove this package though
| const { property, onChange, filter } = props | ||
|
|
||
| const possibleKeys = [ | ||
| property.path, |
There was a problem hiding this comment.
keeping contains key as it was before to prevent other adapters to not be able to recognize it
|
This is a good start but ideally the entire filter system should be rebuilt to allow |
hey @dziraf, I added this functionality into adapters and covered the other operators that you mentioned. Pls when you get some time |
|
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. |
|
hey @dziraf, could you pls help me with your Review when you get some time |
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.

Updates were added to these adapters as well: