ElemeFE / ElemeFE/element

[Feature Request] ELSelect click will closed drop-down selection box and clear input text

Open
#20,861 2 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Existing Component

### Component Name
ELSelect

### Description
Hope to put the closed event on the icon on the right,I tried to rewrite the display switching method, but I don’t know if it’s right。
------------------------------------------------------
const toggleMenu = function({ target }) {
const $arrowEL = target.className.includes('arrow')
if (this.query && this.visible && !$arrowEL) return
if (!this.selectDisabled) {
if (this.menuVisibleOnFocus) {
this.menuVisibleOnFocus = false
if ($arrowEL) {
this.visible = !this.visible
}
} else {
this.visible = !this.visible
}
if (this.visible) {
(this.$refs.input || this.$refs.reference).focus()
}
}
}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.