fix: prevent duplicate action mounting from double-click#19505
fix: prevent duplicate action mounting from double-click#19505People-Sea wants to merge 1 commit intofilamentphp:4.xfrom
Conversation
danharrin
left a comment
There was a problem hiding this comment.
So I would have thought the unmountAction() (for when the mounted action cannot be resolved) would have accounted for this, is there a reason it doesn't catch it? I'm just a bit concerned that this current solution breaks the case where an action is embedded within an action modal with the same name and arguments?
I think the ideal solution is to attempt to resolve the action, and if its not resolvable then remove it from the mounted actions stack, I would have thought that the unmount action line handled that.
|
Got it, thanks @danharrin! Updated in the latest commit. The issue was resolveTableAction() ignored $parentActions, so duplicates always resolved successfully and unmountAction() cleanup never kicked in. Now it matches what For nested same-named actions in modals, they won't have context['table'], so they go through resolveAction(), not affected. |
d47f0eb to
d6503ac
Compare
Description
Fixes: #19483
resolveTableAction()doesn't check$parentActionslikeresolveAction()does,so duplicate table actions from double-clicks always resolve successfully instead
of failing and being cleaned up by
unmountAction().Visual changes
Before
before.mp4
After
after.mp4
Functional changes
composer cscommand.