From 625ac80d5384efc16f2f3adbb045480e03b1a3b9 Mon Sep 17 00:00:00 2001 From: adi Date: Wed, 2 Aug 2017 14:33:33 +0300 Subject: [PATCH] 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