Reimplement fix 60297f6ccb in a different way to avoid triggering infinite update loop
This commit is contained in:
@@ -75,7 +75,7 @@
|
|||||||
:placeholder="field.field.example"
|
:placeholder="field.field.example"
|
||||||
:autofocus="field.autofocus"
|
:autofocus="field.autofocus"
|
||||||
:tabindex="field.tabIndex"
|
:tabindex="field.tabIndex"
|
||||||
:disabled="readonly(key, field, field.field.readonly)"
|
:disabled="field.field.readonly"
|
||||||
@keydown="triggerSuggestions($event, key, field)"
|
@keydown="triggerSuggestions($event, key, field)"
|
||||||
@focus="focus(key, field, true)"
|
@focus="focus(key, field, true)"
|
||||||
@blur="focus(key, field, false)"
|
@blur="focus(key, field, false)"
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
:placeholder="field.field.example"
|
:placeholder="field.field.example"
|
||||||
:autofocus="field.autofocus"
|
:autofocus="field.autofocus"
|
||||||
:tabindex="field.tabIndex"
|
:tabindex="field.tabIndex"
|
||||||
:disabled="readonly(key, field, field.field.readonly)"
|
:disabled="field.field.readonly"
|
||||||
@focus="focus(key, field, true)"
|
@focus="focus(key, field, true)"
|
||||||
@blur="focus(key, field, false)"
|
@blur="focus(key, field, false)"
|
||||||
@input="changed(key, field, false)"
|
@input="changed(key, field, false)"
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
:name="field.field.name"
|
:name="field.field.name"
|
||||||
:autofocus="field.autofocus"
|
:autofocus="field.autofocus"
|
||||||
:tabindex="field.tabIndex"
|
:tabindex="field.tabIndex"
|
||||||
:disabled="readonly(key, field, field.field.readonly)"
|
:disabled="field.field.readonly"
|
||||||
@focus="focus(key, field, true)"
|
@focus="focus(key, field, true)"
|
||||||
@blur="focus(key, field, false)"
|
@blur="focus(key, field, false)"
|
||||||
@input="changed(key, field, false)"
|
@input="changed(key, field, false)"
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
:name="field.field.name"
|
:name="field.field.name"
|
||||||
:autofocus="field.autofocus"
|
:autofocus="field.autofocus"
|
||||||
:tabindex="field.tabIndex"
|
:tabindex="field.tabIndex"
|
||||||
:disabled="readonly(key, field, field.field.readonly)"
|
:disabled="field.field.readonly"
|
||||||
@keyup="expandTextarea($event)"
|
@keyup="expandTextarea($event)"
|
||||||
@keydown="
|
@keydown="
|
||||||
triggerSuggestions($event, key, field) || expandTextarea($event)
|
triggerSuggestions($event, key, field) || expandTextarea($event)
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
:name="field.field.name + '-file'"
|
:name="field.field.name + '-file'"
|
||||||
:autofocus="field.autofocus"
|
:autofocus="field.autofocus"
|
||||||
:tabindex="field.tabIndex"
|
:tabindex="field.tabIndex"
|
||||||
:disabled="readonly(key, field, field.field.readonly)"
|
:disabled="field.field.readonly"
|
||||||
@focus="focus(key, field, true)"
|
@focus="focus(key, field, true)"
|
||||||
@blur="focus(key, field, false)"
|
@blur="focus(key, field, false)"
|
||||||
@change="importFile($event.target, field)"
|
@change="importFile($event.target, field)"
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
:autofocus="field.autofocus"
|
:autofocus="field.autofocus"
|
||||||
:value="field.field.value"
|
:value="field.field.value"
|
||||||
:tabindex="field.tabIndex"
|
:tabindex="field.tabIndex"
|
||||||
:disabled="readonly(key, field, field.field.readonly)"
|
:disabled="field.field.readonly"
|
||||||
@focus="focus(key, field, true)"
|
@focus="focus(key, field, true)"
|
||||||
@blur="focus(key, field, false)"
|
@blur="focus(key, field, false)"
|
||||||
@input="changed(key, field, false)"
|
@input="changed(key, field, false)"
|
||||||
@@ -209,7 +209,7 @@
|
|||||||
:checked="field.field.value === option"
|
:checked="field.field.value === option"
|
||||||
:aria-checked="field.field.value === option"
|
:aria-checked="field.field.value === option"
|
||||||
:tabindex="field.nextSubTabIndex(oKey)"
|
:tabindex="field.nextSubTabIndex(oKey)"
|
||||||
:disabled="readonly(key, field, field.field.readonly)"
|
:disabled="field.field.readonly"
|
||||||
@focus="focus(key, field, true)"
|
@focus="focus(key, field, true)"
|
||||||
@blur="focus(key, field, false)"
|
@blur="focus(key, field, false)"
|
||||||
@input="changed(key, field, false)"
|
@input="changed(key, field, false)"
|
||||||
@@ -408,9 +408,10 @@ export default {
|
|||||||
|
|
||||||
for (let i = 0; i < fields.length; i++) {
|
for (let i = 0; i < fields.length; i++) {
|
||||||
const f = fieldBuilder.build(tabIndex, i, fields[i]);
|
const f = fieldBuilder.build(tabIndex, i, fields[i]);
|
||||||
|
if (f.field.readonly) {
|
||||||
|
this.verify(i, f, true)
|
||||||
|
}
|
||||||
this.current.fields.push(f);
|
this.current.fields.push(f);
|
||||||
|
|
||||||
tabIndex = f.nextTabIndex();
|
tabIndex = f.nextTabIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -639,7 +640,7 @@ export default {
|
|||||||
return verified;
|
return verified;
|
||||||
},
|
},
|
||||||
readonly(key, field, readonly) {
|
readonly(key, field, readonly) {
|
||||||
this.verify(key, field, readonly);
|
// this.verify(key, field, readonly);
|
||||||
return readonly;
|
return readonly;
|
||||||
},
|
},
|
||||||
focus(key, field, focused) {
|
focus(key, field, focused) {
|
||||||
|
|||||||
Reference in New Issue
Block a user