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

front: in the infra editor, when adding a new object, the form is completely red #7446

Open
clarani opened this issue May 17, 2024 · 0 comments · May be fixed by #7921
Open

front: in the infra editor, when adding a new object, the form is completely red #7446

clarani opened this issue May 17, 2024 · 0 comments · May be fixed by #7921
Assignees
Labels
area:front Work on Standard OSRD Interface modules kind:bug Something isn't working module:infra-editor Infra Edition severity:minor Minor severity bug

Comments

@clarani
Copy link
Contributor

clarani commented May 17, 2024

What happened?

I created a first object, let's say a detector. Once it is saved, I click on the button to add a new one. The form is reset, but it is marked as invalid because all the fields are empty.
image

What did you expect to happen?

The form should not be marked as invalid till I did not try to submit it.

How can we reproduce it (as minimally and precisely as possible)?

  1. Go to the editor and select an infra
  2. Click on the detector tool
  3. Fill the form and save it
  4. Click on the button to add a new object
  5. The form is reset but invalid

What operating system, browser and environment are you using?

  • Browser: Firefox v109
  • OS: Nixos v22.11
  • Env: Local

OSRD version (top right corner Account button > Informations)

dev c231679

@clarani clarani added kind:bug Something isn't working area:front Work on Standard OSRD Interface modules severity:minor Minor severity bug module:infra-editor Infra Edition labels May 17, 2024
@sim51 sim51 self-assigned this Jul 1, 2024
sim51 added a commit that referenced this issue Jul 2, 2024
Fix #7446

When the initialEntity ref changes in the editor context, we remount the
form to reset its state ()mainly its isSubmitted state).
It avoids top errors to be displayed when they should not.
@sim51 sim51 linked a pull request Jul 2, 2024 that will close this issue
sim51 added a commit that referenced this issue Jul 4, 2024
Fix #7446

When the initialEntity ref changes in the editor context, we remount the
form to reset its state (mainly its isSubmitted state).
It avoids top errors to be displayed when they should not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules kind:bug Something isn't working module:infra-editor Infra Edition severity:minor Minor severity bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants