Skip to content

Commit

Permalink
fix(U250): fix form ruolo disabilita salvataggio 20241203
Browse files Browse the repository at this point in the history
  • Loading branch information
lcucuzzella authored and sgravinadxc committed Dec 4, 2024
1 parent da45fb6 commit 1c698f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fe-piattaforma/src/pages/forms/formUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const FormUser: React.FC<UserFormI> = (props) => {
setIsFormValid = () => ({}),
getFormValues = () => ({}),
updateForm = () => ({}),
updateFormField = () => ({}),
clearForm = () => ({}),
creation = false,
fieldsToHide = [],
Expand Down Expand Up @@ -131,6 +132,9 @@ const FormUser: React.FC<UserFormI> = (props) => {
}, [userDetails, fieldsToHide.length, creation]);

useEffect(() => {
if (fieldsToHide.includes('ruolo') && form?.ruolo?.value === '') {
updateFormField('ruolo', 'remove');
}
setIsFormValid(isValidForm);
sendNewValues(getFormValues());
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit 1c698f2

Please sign in to comment.