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

Hide Wizard Action buttons using x-bind:class instead of x-show so it… #15493

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

Jessedev1
Copy link
Contributor

@Jessedev1 Jessedev1 commented Jan 31, 2025

… works with hidden Steps

There was a bug with the action buttons in a wizard. When the last step of a wizard was hidden and then becomes visible, the submit button stays visible while it should be replaced by the next button.

This is due to an issue with x-show. Replacing it with x-bind:class makes it react to the changes correctly.

When the hidden step became visible, users were unable to proceed to the next step using the action buttons.

Functional changes

Updated the way action buttons are displayed in the Wizard component.

  • 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.

@danharrin
Copy link
Member

Can you explain the issue with x-show please, is it an Alpine.js bug?

@danharrin danharrin added the bug Something isn't working label Jan 31, 2025
@danharrin danharrin added this to the v3 milestone Jan 31, 2025
@Jessedev1
Copy link
Contributor Author

@danharrin
It looks like an issue with Livewire and Alpine.js 3.
The x-show property is not reactive when used with external components (like those from Livewire).

I've searched the internet and found others experiencing the same issue. This seems to be the only available fix. So far, neither Alpine nor Livewire have released a solution for this.

I've already posted this in the Discord server, and another developer confirmed having the same issue: Discord link.

@danharrin
Copy link
Member

Thanks

@danharrin danharrin merged commit a25e6aa into filamentphp:3.x Feb 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants