From 625ac80d5384efc16f2f3adbb045480e03b1a3b9 Mon Sep 17 00:00:00 2001 From: adi Date: Wed, 2 Aug 2017 14:33:33 +0300 Subject: [PATCH 1/2] Add RTL support --- dev.html | 1 + src/components/Select.vue | 29 ++++++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/dev.html b/dev.html index 8425919..fb863dd 100644 --- a/dev.html +++ b/dev.html @@ -32,6 +32,7 @@
+ diff --git a/src/components/Select.vue b/src/components/Select.vue index 4dc46bf..3ea57e3 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -9,6 +9,19 @@ -moz-box-sizing: border-box; box-sizing: border-box; } + /* Rtl support */ + .v-select.rtl .open-indicator { + left: 10px; + right: auto; + } + .v-select.rtl .selected-tag { + float: right; + margin-right: 3px; + margin-left: 1px; + } + .v-select.rtl .dropdown-menu { + text-align: right; + } /* Open Indicator */ .v-select .open-indicator { position: absolute; @@ -517,7 +530,16 @@ */ inputId: { type: String - } + }, + + /** + * Sets Rtl support. + * @type {Boolean} + */ + rtl: { + type: Boolean, + default: false + }, }, data() { @@ -796,7 +818,8 @@ searching: this.searching, searchable: this.searchable, unsearchable: !this.searchable, - loading: this.mutableLoading + loading: this.mutableLoading, + rtl: this.rtl } }, @@ -806,7 +829,7 @@ */ clearSearchOnBlur() { return this.clearSearchOnSelect && !this.multiple - }, + }, /** * Return the current state of the From f936c808fff96f4da5d3c0df8bf4cd01cf4e0630 Mon Sep 17 00:00:00 2001 From: adi Date: Mon, 7 Aug 2017 20:04:50 +0300 Subject: [PATCH 2/2] Remove `unsearchable` CSS --- src/components/Select.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Select.vue b/src/components/Select.vue index 3ea57e3..dfde71c 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -191,9 +191,9 @@ clear: none; } /* Search Input States */ - .v-select.unsearchable input[type="search"] { + /* .v-select.unsearchable input[type="search"] { max-width: 1px; - } + } */ /* List Items */ .v-select li { line-height: 1.42857143; /* Normalize line height */