laravel / nova-issues

556 stars 34 forks source link

Difficulty Switching Searchable Filter Menus #6242

Open mostafaznv opened 9 months ago

mostafaznv commented 9 months ago

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

crynobone commented 9 months ago

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.

mostafaznv commented 9 months ago

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 commented 8 months ago

Is there anything else I should include in this issue?

stale[bot] commented 8 months ago

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.

mostafaznv commented 8 months ago

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

mostafaznv commented 7 months ago

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

crynobone commented 7 months ago

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