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 issue with page scroll up to the top after change value of any Fields or Create,Save button Inside Tab Component. #6692

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

ibrahimBougaoua
Copy link
Contributor

@ibrahimBougaoua ibrahimBougaoua commented Jun 5, 2023

This issuse appear when i use tab.

( Select Field,Create,Save,... ) whene changing or editing any data in the input field the page view goes up to the start of the page . i want to prevent the page view from changing after changing the data entry on the input field.

Solution : I added wire:ignore.self to the parent div of tab component,becouse wire:ignore.self only ignores the DOM element it is attached to,and all children element and fields work perfectly.

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

@what-the-diff
Copy link
Contributor

what-the-diff bot commented Jun 5, 2023

PR Summary

  • Added wire:ignore.self directive to the tabs component
    This improves performance by preventing unnecessary re-rendering of the tabs component when there are updates within itself.

@ibrahimBougaoua ibrahimBougaoua changed the title Fix issue with page scroll up to the top after change value of any fi… Fix issue with page scroll up to the top after change value of any Fields or Create,Save button Inside Tab. Jun 5, 2023
@ibrahimBougaoua ibrahimBougaoua changed the title Fix issue with page scroll up to the top after change value of any Fields or Create,Save button Inside Tab. Fix issue with page scroll up to the top after change value of any Fields or Create,Save button Inside Tab Component. Jun 5, 2023
Copy link
Member

@zepfietje zepfietje left a comment

Choose a reason for hiding this comment

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

Mark as ready for review when done!

packages/forms/resources/views/components/tabs.blade.php Outdated Show resolved Hide resolved
@zepfietje zepfietje marked this pull request as draft June 5, 2023 06:46
@zepfietje zepfietje added the bug Something isn't working label Jun 5, 2023
@zepfietje zepfietje added this to the v2 milestone Jun 5, 2023
@zepfietje zepfietje marked this pull request as ready for review June 5, 2023 10:24
@zepfietje zepfietje removed their request for review June 5, 2023 13:13
@danharrin danharrin merged commit 5a6d404 into filamentphp:2.x Jun 6, 2023
10 of 11 checks passed
@danharrin
Copy link
Member

Thanks

@rafayrty
Copy link
Contributor

rafayrty commented Aug 5, 2023

The following issue also occurs on the wizard component of the filamentphp project by adding wire:ignore.self to wizard.blade.php this issue can be resolved for it as well. @danharrin

@danharrin
Copy link
Member

Can you PR it then?

@rafayrty
Copy link
Contributor

rafayrty commented Aug 5, 2023

yes i will add a PR.

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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants