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

bugfix: clear dialogs data upon reopening #339

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maximeBAY
Copy link
Collaborator

@maximeBAY maximeBAY commented Jan 6, 2025

  • The project passes automated tests locally (build, linting, etc.).
  • You updated the project's documentation with new changes.
  • You've linked any issue this PR closes
  • You reviewed your own PR and made sure there's no test/debug code or any obvious mistakes.

Make sure that the code wasn't copied from elsewhere (check one):

  • This is your own original code
  • You have made sure that we have permission to use the copied code and that we follow its licensing

Fixed dialogs that were not clearing previous data properly upon loading: Site, Comments, SiteAnnoucement, SiteContact

Also investigated rest of dialogs and the others were behaving the proper way

Closes #316


useEffect(() => setSite(defaultSiteDto), [siteId])

if (loading) return null
Copy link
Contributor

Choose a reason for hiding this comment

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

More of a "hide on opening" than a "clear on close". But whatever, as long as it works, this isn't the most robust part of the site.
As long as we keep improving the form validations, in #239, #240 and #242, that'll be the most important part.

@Samuel-Therrien-Beslogic
Copy link
Contributor

Samuel-Therrien-Beslogic commented Jan 22, 2025

Let's wait for #335 to be merged first to avoid bad merge conflicts on that PR. I'd rather have them here if any.

@Samuel-Therrien-Beslogic Samuel-Therrien-Beslogic force-pushed the feat/clear-dialogs-data-upon-closing branch from 6fe37c8 to 78c1e7c Compare January 22, 2025 00:13
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

Successfully merging this pull request may close these issues.

UX: Dialog forms keep their data upon closing and re-openning
2 participants