mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-30 03:07:36 +08:00
Select: fix infinite loop of keyboard navigation when all filtered options are disabled (#10945)
This commit is contained in:
parent
16dc174a8d
commit
1aed314527
@ -7,7 +7,7 @@ export default {
|
||||
|
||||
computed: {
|
||||
optionsAllDisabled() {
|
||||
return this.options.length === this.options.filter(item => item.disabled === true).length;
|
||||
return this.options.filter(option => option.visible).every(option => option.disabled);
|
||||
}
|
||||
},
|
||||
|
||||
@ -47,8 +47,8 @@ export default {
|
||||
!option.visible) {
|
||||
this.navigateOptions(direction);
|
||||
}
|
||||
this.$nextTick(() => this.scrollToOption(this.hoverOption));
|
||||
}
|
||||
this.$nextTick(() => this.scrollToOption(this.hoverOption));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user