Skip to content

Commit ac2aa42

Browse files
Merge pull request #1063 from appwrite/fix-mfa-submit
Fix value not updating when autoSubmit is false
2 parents b926da3 + 018c9b7 commit ac2aa42

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/lib/elements/forms/inputDigits.svelte

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
placeholder: '',
2323
defaultValue: value.split(''),
2424
onValueChange: ({ next }) => {
25-
if (!autoSubmit) {
26-
return next;
27-
}
2825
value = next.join('');
2926
30-
if (value.length === length && !autoSubmitted) {
27+
if (autoSubmit && value.length === length && !autoSubmitted) {
3128
autoSubmitted = true;
3229
const firstInputElement = element.querySelector('input');
3330
firstInputElement?.form.requestSubmit();

0 commit comments

Comments
 (0)