♻️ do not edit tags if readonly

This commit is contained in:
Fred KISSIE
2026-03-12 18:53:18 +01:00
parent fee44ce960
commit 01b068c50f

View File

@@ -252,13 +252,15 @@ export function EditPolicyOtpEmailSectionForm({
.emails ?? [] .emails ?? []
} }
setTags={(newEmails) => { setTags={(newEmails) => {
form.setValue( if (!readonly) {
"emails", form.setValue(
newEmails as [ "emails",
Tag, newEmails as [
...Tag[] Tag,
] ...Tag[]
); ]
);
}
}} }}
allowDuplicates={false} allowDuplicates={false}
sortTags={true} sortTags={true}