aymanalhattami / filament-context-menu

Add a context menu (right click menu) for resource pages, custom pages and table cells of Filament Admin Panel.
https://github.com/aymanalhattami/filament-context-menu
MIT License
89 stars 9 forks source link

[Bug]: Context menu not showing until refresh the page and it's not desapear after changing page #2

Closed saifonglee closed 5 months ago

saifonglee commented 5 months ago

What happened?

  1. the contextMenu appear correctly when refresh the page. but if i come to the page without refreshing it, the contextMenu not showing.
  2. when i click link on the contextMenu to change page, in the targeted page, i have to refresh before seing the conextMenu. and the contextMenu do not disapear when go back to the previous page even if i click on Esc key or refresh the page.

How to reproduce the bug

  1. add the PageHasContextMenu to the page
  2. add the getContextMenuActions function and set the contextMenu actions
  3. test on the targeted pages.

Package Version

1.0.0

PHP Version

8.2.17

Laravel Version

10.x

Which operating systems does with happen with?

Linux

Notes

No response

aymanalhattami commented 5 months ago

Check browser console to see if there is an error

saifonglee commented 5 months ago

Capture d’écran du 2024-04-29 09-45-34

aymanalhattami commented 5 months ago

These errors not related to the package

saifonglee commented 5 months ago

so there is no error, but it still not workong well. i've to refresh the page to be able to see the contextMenu

zajinx commented 5 months ago

I think this happens only in SPA mode, if I enable it when I navigate from a page without context menu enable to one with context menu it doesn't load up, but if access the page directly it works no problem

aymanalhattami commented 5 months ago

PRs are welcome

JoshuaSigaban commented 5 months ago

Yes @zajinx looks like the issue is when using ->spa() Also experiencing the same issue

aymanalhattami commented 5 months ago

fixed https://github.com/aymanalhattami/filament-context-menu/pull/7