mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-19 09:50:33 +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>
|
<template>
|
||||||
<div class="dropdown v-select" :class="dropdownClasses">
|
<div class="dropdown v-select" :class="dropdownClasses">
|
||||||
<div v-el:toggle @mousedown.prevent="toggleDropdown" class="dropdown-toggle clearfix" type="button">
|
<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">
|
<span class="selected-tag" v-for="option in valueAsArray" track-by="$index">
|
||||||
{{ getOptionLabel(option) }}
|
{{ getOptionLabel(option) }}
|
||||||
@@ -188,7 +185,6 @@
|
|||||||
v-el:search
|
v-el:search
|
||||||
:debounce="debounce"
|
:debounce="debounce"
|
||||||
v-model="search"
|
v-model="search"
|
||||||
v-show="searchable"
|
|
||||||
@keydown.delete="maybeDeleteValue"
|
@keydown.delete="maybeDeleteValue"
|
||||||
@keyup.esc="onEscape"
|
@keyup.esc="onEscape"
|
||||||
@keydown.up.prevent="typeAheadUp"
|
@keydown.up.prevent="typeAheadUp"
|
||||||
@@ -199,6 +195,7 @@
|
|||||||
type="search"
|
type="search"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
:placeholder="searchPlaceholder"
|
:placeholder="searchPlaceholder"
|
||||||
|
:readonly="!searchable"
|
||||||
:style="{ width: isValueEmpty ? '100%' : 'auto' }"
|
:style="{ width: isValueEmpty ? '100%' : 'auto' }"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user