Skip to content
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

MenuItem::filter doesnt work with filters that have custom key() methods #6539

Closed
matthewjumpsoffbuildings opened this issue Sep 26, 2024 · 1 comment
Labels
bug Verified bug by the Nova team fix incoming A fix is in review
Milestone

Comments

@matthewjumpsoffbuildings
Copy link

matthewjumpsoffbuildings commented Sep 26, 2024

Description:

If a filter class is defined with a custom key() method, then the MenuItem::filter() method fails to apply the filter. The reproduction repository demonstrates this, the App\Nova\Filters\UserFilter class has a custom key() and in NovaServiceProvider I am setting up a custom menu with some filtered resources. If you click through to the Filter 1 or Filter 2 menu items you will see no filter is applied. However if you modify App\Nova\Filters\UserFilter, the menu item filtering works again

@crynobone crynobone added bug Verified bug by the Nova team fix incoming A fix is in review labels Oct 8, 2024
@crynobone crynobone added this to the 4.x milestone Oct 8, 2024
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified bug by the Nova team fix incoming A fix is in review
Projects
None yet
Development

No branches or pull requests

2 participants