From b60aba91345f530d2d5d9df2226f40f8a617f406 Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 26 Oct 2019 13:01:46 -0700 Subject: [PATCH] add prop --- src/components/Select.vue | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/components/Select.vue b/src/components/Select.vue index f2aba4e..83c2b8b 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -13,7 +13,7 @@ :deselect="deselect" :multiple="multiple" :disabled="disabled"> - + {{ getOptionLabel(option) }} @@ -300,6 +300,24 @@ } }, + /** + * Adjust the CSS classes applied to selected values. + */ + getSelectedOptionClasses: { + type: Function, + /** + * Determines the classname for a given selected option. Receives the + * option as a parameter should return a valid class binding via a + * String, Object, or Array. + * + * @see https://vuejs.org/v2/guide/class-and-style.html + * + * @param option {Object|String|Number} An option that has been selected + * @return {Array|Object|String} Any valid VueJS class binding format. + */ + default: option => ['vs__selected'] + }, + /** * Select the current value if selectOnTab is enabled */