fix: select not hide when use keydown

pull/1143/head
tanjinzhou 5 years ago
parent ae905df339
commit c9107da055

@ -338,7 +338,11 @@ const Select = {
if (open && !this.getInputDOMNode()) {
this.onInputKeydown(event);
} else if (keyCode === KeyCode.ENTER || keyCode === KeyCode.DOWN) {
if (!open) {
// vue stateonKeyDownonMenuSelectsetOpenState
// https://github.com/vueComponent/ant-design-vue/issues/1142
if (keyCode === KeyCode.ENTER && !isMultipleOrTags(this.$props)) {
this.maybeFocus(true);
} else if (!open) {
this.setOpenState(true);
}
event.preventDefault();

Loading…
Cancel
Save