fix/validation on load on creation form - #1000
Conversation
| if (backendValues.length === 0 && attribute.required) { | ||
| // Set field in error when TreeField is displayed for the first time. Otherwise, errors will be handled by other functions in this file. | ||
| // Set field in error when TreeField is displayed for the first time. Otherwise, errors will be handled by other functions in this file. | ||
| if (backendValues.length === 0 && attribute.required && formIdToLoad === 'edition') { |
There was a problem hiding this comment.
issue: Ça marche bien pour les liens, mais pas pour les arbres ! Cependant peut-être que la solution est d'utiliser avoidFormValidationOnLoad de #992 pour cette condition (et éventuellement celle des liens).
There was a problem hiding this comment.
J'ai poussé le correctif et j'en ai profité pour supprimer un contexte inutile.
There was a problem hiding this comment.
Maintenant, lors de l'edition, les liens requis (qui ne sont donc pas dans le formulaire de création) n'ayant pas de valeur initiale restent en erreur même après une assignation. Pas de pb avec les arbre a première vue.
There was a problem hiding this comment.
Cette partie va être grandement refactoré avec l'UX des liaisons. Je propose qu'on laisse ça comme ça et qu'on pense à bien faire attention à ça lors des devs.
Replacement for #992
Ticket: https://aristid.atlassian.net/browse/LEAVC-150
Checklist
Definition Of Review
Definition Of Mergeable