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

Fix form fields ax-load issue on spa-mode #9204

Merged
merged 13 commits into from
Nov 20, 2023

Conversation

akunbeben
Copy link
Contributor

@akunbeben akunbeben commented Oct 19, 2023

  • Changes have been thoroughly tested to not break existing functionality.
  • New functionality has been documented or existing documentation has been updated to reflect changes.
  • Visual changes are explained in the PR description using a screenshot/recording of before and after.

As per #9151 fixes the table ax-load issue on spa mode, the same issue also happened in some form fields.
This PR will fix it.

Screen.Recording.2023-10-20.at.4.03.38.AM.mp4

@akunbeben
Copy link
Contributor Author

DateTimePicker still has the issue with the displayText etc. I'm working on it

@zepfietje zepfietje marked this pull request as draft October 20, 2023 07:33
@zepfietje zepfietje added the bug Something isn't working label Oct 20, 2023
@zepfietje zepfietje added this to the v3 milestone Oct 20, 2023
@zepfietje
Copy link
Member

Thanks for working on this, @akunbeben!
Could you mark this PR as ready for review when you've implemented all pending changes?

@ArtMin96
Copy link
Contributor

I have the same issue. Thanks @akunbeben

@akunbeben
Copy link
Contributor Author

Thanks for working on this, @akunbeben! Could you mark this PR as ready for review when you've implemented all pending changes?

Yes, I will.
I'll continue to work on it later today

@ArtMin96
Copy link
Contributor

ArtMin96 commented Nov 7, 2023

Any news for this PR?

@akunbeben
Copy link
Contributor Author

DateTimePicker still has the issue with the displayText etc. I'm working on it

Sorry for the delay. After a while, I finally recognized that the problem was when we async load the component, it is not really asynchronous because the livewire.js expects the props in the first place.

Simply "wire:ignore" along with ax-load="visible" solves the problem.

Manually tested.

@akunbeben akunbeben marked this pull request as ready for review November 15, 2023 03:29
@danharrin
Copy link
Member

Please revert all unnecessary changes where you are moving large code blocks like this

New imports can be added at the top of the existing code blocks, they don't need to be split

Screenshot 2023-11-15 at 10 03 19

@akunbeben
Copy link
Contributor Author

Changing it, Sorry

@danharrin danharrin self-assigned this Nov 18, 2023
@danharrin danharrin merged commit 8f4c759 into filamentphp:3.x Nov 20, 2023
4 checks passed
@ArtMin96
Copy link
Contributor

ArtMin96 commented Nov 28, 2023

The problems of Date and Time pickers have not been fixed. Adding wire:ignore fixed the issue and it's not breaking the dynamic feature (tested locally).

@if (FilamentView::hasSpaMode())
    ax-load="visible"
    wire:ignore
@else
    ax-load
@endif

image

@danharrin
Copy link
Member

wire:ignore would break dynamic min/max dates and disabled dates

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.

None yet

4 participants