Merge pull request #7299 from J-Michalek/fix/multi-select-filter-and-option-focus
fix(multi-select): autoFilterFocus and autoOptionFocus working togetherpull/7377/head
commit
aeaf46189b
|
@ -738,6 +738,7 @@ export default {
|
|||
this.scrollInView();
|
||||
|
||||
this.autoFilterFocus && focus(this.$refs.filterInput.$el);
|
||||
this.autoUpdateModel();
|
||||
},
|
||||
onOverlayAfterEnter() {
|
||||
this.bindOutsideClickListener();
|
||||
|
@ -995,8 +996,11 @@ export default {
|
|||
});
|
||||
},
|
||||
autoUpdateModel() {
|
||||
if (this.selectOnFocus && this.autoOptionFocus && !this.$filled) {
|
||||
if (this.autoOptionFocus) {
|
||||
this.focusedOptionIndex = this.findFirstFocusedOptionIndex();
|
||||
}
|
||||
|
||||
if (this.selectOnFocus && this.autoOptionFocus && !this.$filled) {
|
||||
const value = this.getOptionValue(this.visibleOptions[this.focusedOptionIndex]);
|
||||
|
||||
this.updateModel(null, [value]);
|
||||
|
|
Loading…
Reference in New Issue