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

Encountering this.$refs.searchable.close is not a function Error When Filtering Relationships on Index Page #6189

Closed
mostafaznv opened this issue Feb 12, 2024 · 2 comments
Labels
bug Verified bug by the Nova team
Milestone

Comments

@mostafaznv
Copy link

mostafaznv commented Feb 12, 2024

  • Laravel Version: 10.43.0
  • Nova Version: 4.32.11
  • PHP Version: 8.3.2
  • 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
  • Reproduction Repository: https://github.com/mostafaznv/nova-searchable-filters-bug



Description:

I'm facing an issue with belongsTo relationships in my Nova resources.
If I enable the searchable method on the belongsTo field, the filter box crashes, and I receive a console error.
These fields work fine when I want to create/update an item on the add/edit pages.
However, when I attempt to filter results on the index page, the filter box crashes, and I receive a console error.

image




Reproduction Steps:

  1. Clone the repository
  2. Open the .env file and set your database credentials (DB_DATABASE, DB_USERNAME, DB_PASSWORD)
  3. Open the .env file and set your NOVA_LICENSE_KEY
  4. Run composer install
  5. Migrate and seed the database using the following command:
    php artisan migrate:fresh --seed
  6. Run the server using the following command:
    php artisan serve
  7. Visit the admin panel by going to http://127.0.0.1:8000/nova
  8. Your credentials are:
  9. Open the inspect element tool in Chrome/Firefox and navigate to the console tab
  10. Go to the Article resource and try to filter the results using the User/Category filter.
  11. Boom! You will see the error in the console, and the filter box will crash until you close it or refresh the page.

Related To: #6118

@mostafaznv
Copy link
Author

Hi again,

Firstly, thank you for the quick action on this. I've updated nova to the latest version (v4.32.12). While there has been some improvement, the bug still persists.

As shown in the attached video, when I open a menu for the first time and select an item, I encounter difficulty switching to other menus. Sometimes it takes several clicks to register, and occasionally, I'm unable to type anything in the menu at all.

Note: Console errors have disappeared.

nova-searchable-filters.mp4

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 Feb 20, 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
Projects
None yet
Development

No branches or pull requests

2 participants