Merge pull request #1063 from appwrite/fix-mfa-submit

Fix value not updating when autoSubmit is false
This commit is contained in:
Torsten Dittmann
2024-05-02 11:55:59 +02:00
committed by GitHub
+1 -4
View File
@@ -22,12 +22,9 @@
placeholder: '',
defaultValue: value.split(''),
onValueChange: ({ next }) => {
if (!autoSubmit) {
return next;
}
value = next.join('');
if (value.length === length && !autoSubmitted) {
if (autoSubmit && value.length === length && !autoSubmitted) {
autoSubmitted = true;
const firstInputElement = element.querySelector('input');
firstInputElement?.form.requestSubmit();