2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-10 07:52:23 +03:00

Fix hidden input when reselecting in single mode

What
---
- Removing hidden class from single inputs when the dropdown is hidden.
- Changing from `display:none` to zero width when hiding the input.

Why
---
Because the user will be typing for another element if reopening the
dropdown, which we need to allow.
This commit is contained in:
Erik Nygren
2018-06-15 18:58:05 +01:00
parent 970d1da3c2
commit 16b6bd7d09
2 changed files with 25 additions and 2 deletions
+3 -2
View File
@@ -215,7 +215,8 @@
cursor: pointer;
}
.v-select input[type="search"].hidden {
display: none;
width: 0px;
padding: 0;
}
.v-select input[type="search"].shrunk {
width: auto;
@@ -989,7 +990,7 @@
*/
inputClasses() {
return {
hidden: !this.multiple && !this.isValueEmpty,
hidden: !this.multiple && !this.isValueEmpty && !this.dropdownOpen,
shrunk: this.multiple && !this.isValueEmpty,
empty: this.isValueEmpty,
}