nova-issues icon indicating copy to clipboard operation
nova-issues copied to clipboard

Difficulty Switching Searchable Filter Menus

Open mostafaznv opened this issue 4 months ago • 7 comments

  • Laravel Version: 10.45.1
  • Nova Version: 4.32.15
  • PHP Version: 8.3.3
  • Database Driver & Version: Mysql 8.0.33
  • Operating System and Version: MacOS 14.2.1
  • Browser type and version: Google Chrome 121.0.6167.160

Hey everyone,

Apologies for reaching out again. Over the past month, I've opened three issues regarding the "Difficulty Switching Searchable Filter Menus" problem (first, second, third). Firstly, thank you for your quick responses and the fixes released so far. However, the issue persists.

To recap, I've enabled the searchable and filterable flags on some BelongsTo fields. While searching works fine on create/update pages, encountering at least two of these fields on the index page leads to difficulties when trying to use the filter menu. (For detailed explanations and recorded video demonstrations of the issue, please refer to the previous issues)


Some Investigations

Upon investigating the Nova source code, I found that commenting out this.$refs.input.focus() in the chooseSelected and choose methods of resources/js/components/Inputs/SearchInput.vue resolves the problem. However, this disables the focus feature, reopening menus using keyup/keydown events, and the tab functionality.

Further investigation revealed that this issue arises when using SearchInput in nested dropdowns.


I hope this information is helpful. While I'm still working on finding a proper fix, I'm relatively new to Nova core. Thanks for your understanding.

Related To: https://github.com/laravel/nova-issues/issues/6189 https://github.com/laravel/nova-issues/issues/6199 https://github.com/laravel/nova-issues/issues/6227

Reproduction Repository: https://github.com/mostafaznv/nova-searchable-filters-bug

Video: link

mostafaznv avatar Feb 27 '24 23:02 mostafaznv

The video shown is not based on the latest code. Please provide a new video showing the issue as I cannot replicate the " difficulty" on the latest version after reverting Composition API (issues with dynamic refs) to Option API.

crynobone avatar Feb 27 '24 23:02 crynobone

Bug

I've recorded a new video based on the latest code (v4.32.15).

https://github.com/laravel/nova-issues/assets/7619687/2b754a4c-5261-47a7-81f4-bc95dcf37847


Fix

And as you can see, after commenting the this.$refs.input.focus(), the filter box works as expected

https://github.com/laravel/nova-issues/assets/7619687/d8fd85d7-41d4-4823-814f-c179dfb9ebed

screenshot

mostafaznv avatar Feb 28 '24 06:02 mostafaznv

Is there anything else I should include in this issue?

mostafaznv avatar Mar 05 '24 11:03 mostafaznv

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 17 '24 16:03 stale[bot]

It's not a stale issue; I'm awaiting a reply from the Nova team.

mostafaznv avatar Mar 17 '24 16:03 mostafaznv

Hi again, Any updates? I've provided sufficient information to reproduce the bug. I've also noticed other issues reporting the same issue, but they were all automatically closed by a bot.

@crynobone

mostafaznv avatar Apr 27 '24 07:04 mostafaznv

What's can be fixed already has been fixed, still not confident that is solved and that's the reason it's still open at the moment. More reports and ideas are welcomed

crynobone avatar Apr 27 '24 07:04 crynobone