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:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -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' }"
|
||||
>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user