Fixed tabIndex on the connector page. Tab key should work as expected now.

This commit is contained in:
NI
2020-05-18 17:38:18 +08:00
parent 194de5af00
commit d7b9a8e437
2 changed files with 21 additions and 7 deletions

View File

@@ -155,7 +155,7 @@
autocomplete="off"
:name="field.field.name"
:placeholder="field.field.example"
style="display: none"
style="display: none;"
@input="changed(key, field, false)"
@change="changed(key, field, true)"
/>
@@ -275,7 +275,15 @@
<div
v-if="preloaderIDName.length > 0"
style="width: 1px; height: 1px; margin: 10px; position: absolute; top: 0; bottom: 0; overflow: hidden;"
style="
width: 1px;
height: 1px;
margin: 10px;
position: absolute;
top: 0;
bottom: 0;
overflow: hidden;
"
>
<div :id="preloaderIDName">
{{ current.title || connector.name }} wizard
@@ -400,7 +408,13 @@ export default {
const f = fieldBuilder.build(tabIndex, i, fields[i]);
this.current.fields.push(f);
tabIndex = f.nextTabIndex();
const newTabIndex = f.nextTabIndex();
// Ignore if the field does not contain tabIndex
if (newTabIndex > 1) {
tabIndex = newTabIndex;
}
}
this.submitterTabIndex = tabIndex > 0 ? tabIndex : 1;

View File

@@ -151,7 +151,7 @@ export function build(tabIndex, i, field) {
this.suggestions.push({
title: suggestions[v].title,
value: suggestions[v].value,
fields: suggestions[v].meta
fields: suggestions[v].meta,
});
}
},
@@ -160,12 +160,12 @@ export function build(tabIndex, i, field) {
return {
title: "Input",
value: this.loadStored(defaultValue),
fields: {}
fields: {},
};
}
return this.suggestions[this.selected];
}
},
},
disableSuggestionsForInput(val) {
this.blockedSuggestionValue = val;
@@ -208,6 +208,6 @@ export function build(tabIndex, i, field) {
},
selectedSuggestionIndex() {
return this.suggestion.selected;
}
},
};
}