Skip to content

fix: prevent duplicate action mounting from double-click#19505

Open
People-Sea wants to merge 1 commit intofilamentphp:4.xfrom
People-Sea:fix/issues/19483
Open

fix: prevent duplicate action mounting from double-click#19505
People-Sea wants to merge 1 commit intofilamentphp:4.xfrom
People-Sea:fix/issues/19483

Conversation

@People-Sea
Copy link
Contributor

@People-Sea People-Sea commented Mar 14, 2026

Description

Fixes: #19483

resolveTableAction() doesn't check $parentActions like resolveAction() 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

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@github-project-automation github-project-automation bot moved this to Todo in Roadmap Mar 14, 2026
@People-Sea People-Sea marked this pull request as ready for review March 14, 2026 15:09
@danharrin danharrin added the bug Something isn't working label Mar 16, 2026
@danharrin danharrin added this to the v4 milestone Mar 16, 2026
Copy link
Member

@danharrin danharrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Mar 16, 2026
@People-Sea
Copy link
Contributor Author

People-Sea commented Mar 16, 2026

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
resolveAction() already does.

For nested same-named actions in modals, they won't have context['table'], so they go through resolveAction(), not affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working pending changes

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Double click mounts schema twice

2 participants