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

Re-population not working properly on smaller screens #860

Closed
fongsean opened this issue Jun 13, 2024 · 1 comment
Closed

Re-population not working properly on smaller screens #860

fongsean opened this issue Jun 13, 2024 · 1 comment

Comments

@fongsean
Copy link
Collaborator

Describe the bug
On larger screen sizes when hitting the Repopulate Form button located on the side bar, the "Select items to be re-populated" dialog appears if there are items to be re-populated.

However on smaller screen sizes where the Repopulate Form button is located in the hover menu (bottom right), it always show the "Form is up to date" dialog.

After some debugging, it seems like the error is caused by the automatic closing and re-opening of the hover menu. At the moment, the itemsToRepopulate state is located on the button itself. That means when the hover menu closes, the itemsToRepopulate state is destroyed, which then always results in an empty itemsToRepopulate state when it re-opens - which is why we always get "Form is up to date".

Potential solutions
There is a need to re-factor how theitemsToRepopulate state is stored, we could leverage a global state management store instead of keeping the state local to the re-pop button.

Expected behavior
In both cases, the correct rpopulation-related dialogs should be displayed consistently.

@fongsean
Copy link
Collaborator Author

Resolved by #895

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant