2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

Changed implementation of non searchable option.

This now uses the same input field but makes it readonly instead of trying to swap it out for a non focusable element in turn causing the following issues:
* styling is different
* element is not focusable
* keyboard support - navigating options is disabled
* cannot tab to component
This commit is contained in:
Dean Tedesco
2016-09-29 11:46:27 +10:00
parent 99d8af54e4
commit a7d3d8f1bc
3 changed files with 3 additions and 6 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -4
View File
@@ -173,9 +173,6 @@
<template>
<div class="dropdown v-select" :class="dropdownClasses">
<div v-el:toggle @mousedown.prevent="toggleDropdown" class="dropdown-toggle clearfix" type="button">
<span class="form-control" v-if="!searchable && isValueEmpty">
{{ placeholder }}
</span>
<span class="selected-tag" v-for="option in valueAsArray" track-by="$index">
{{ getOptionLabel(option) }}
@@ -188,7 +185,6 @@
v-el:search
:debounce="debounce"
v-model="search"
v-show="searchable"
@keydown.delete="maybeDeleteValue"
@keyup.esc="onEscape"
@keydown.up.prevent="typeAheadUp"
@@ -199,6 +195,7 @@
type="search"
class="form-control"
:placeholder="searchPlaceholder"
:readonly="!searchable"
:style="{ width: isValueEmpty ? '100%' : 'auto' }"
>