Remove TypedInput from tab focus when only one type available

This commit is contained in:
Nick O'Leary 2021-04-19 15:27:47 +01:00
parent ff00afb5d7
commit 233a74c146
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 5 additions and 0 deletions

View File

@ -669,6 +669,11 @@
that.typeMap[result.value] = result;
return result;
});
if (this.typeList.length < 2) {
this.selectTrigger.attr("tabindex", -1)
} else {
this.selectTrigger.attr("tabindex", 0)
}
this.selectTrigger.toggleClass("disabled", this.typeList.length === 1);
this.selectTrigger.find(".fa-caret-down").toggle(this.typeList.length > 1)
if (this.menu) {