-
Notifications
You must be signed in to change notification settings - Fork 892
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
[Bug] Unable to use filter of type 'view' #5638
Comments
Hello there! Thanks for opening your first issue on this repo! Just a heads-up: Here at Backpack we use GitHub Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that. Backpack communication channels:
Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch. Thank you! -- |
Sorry for the inconvenience, and thanks for reporting the BUG. I'm escalating the issue for the fix. @pxpm In my investigation, I found the following:
|
Hey @GiuseppeBenfenati thanks for the report. Sorry the filters api is a little bit messy, we will give it some love. 🙏 What I usually do, and I advice anyone to do, is something along this lines: CRUD::filter('path')->type('path_field')->viewNamespace('vendor.backpack.crud.filters')->whenActive(function ($value) {
CRUD::addClause('pathHasNode', $value);
}); After the update, the way you defined should work just fine, but if you want a more future-proof, I would use the one I told you now. Cheers |
I configured in list operation a filter with custom view:
I received Exception
View component use 'view' key to include custom view
I think the problem is in the CrudFilter class can't convert view method in options key because 'view' is already a class property
I ovverided view component and used another key
The text was updated successfully, but these errors were encountered: