fix(multi-select): autoFilterFocus and autoOptionFocus working together

pull/7299/head
J-Michalek 2025-02-22 07:19:42 +01:00
parent 10694a2902
commit a0e68a619b
1 changed files with 5 additions and 1 deletions

View File

@ -738,6 +738,7 @@ export default {
this.scrollInView(); this.scrollInView();
this.autoFilterFocus && focus(this.$refs.filterInput.$el); this.autoFilterFocus && focus(this.$refs.filterInput.$el);
this.autoUpdateModel();
}, },
onOverlayAfterEnter() { onOverlayAfterEnter() {
this.bindOutsideClickListener(); this.bindOutsideClickListener();
@ -995,8 +996,11 @@ export default {
}); });
}, },
autoUpdateModel() { autoUpdateModel() {
if (this.selectOnFocus && this.autoOptionFocus && !this.$filled) { if (this.autoOptionFocus) {
this.focusedOptionIndex = this.findFirstFocusedOptionIndex(); this.focusedOptionIndex = this.findFirstFocusedOptionIndex();
}
if (this.selectOnFocus && this.autoOptionFocus && !this.$filled) {
const value = this.getOptionValue(this.visibleOptions[this.focusedOptionIndex]); const value = this.getOptionValue(this.visibleOptions[this.focusedOptionIndex]);
this.updateModel(null, [value]); this.updateModel(null, [value]);