From a8893d657c4befef9fc349b349440b4dea0d67c2 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Tue, 1 Oct 2019 15:42:24 +0300 Subject: [PATCH] Fixed #57 - MultiSelect filter cannot be turned off --- src/components/multiselect/MultiSelect.vue | 14 +++++++------- src/views/multiselect/MultiSelectDoc.vue | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/multiselect/MultiSelect.vue b/src/components/multiselect/MultiSelect.vue index 25e11dd86a..ad88c9faac 100644 --- a/src/components/multiselect/MultiSelect.vue +++ b/src/components/multiselect/MultiSelect.vue @@ -24,7 +24,7 @@ -
+
@@ -129,7 +129,7 @@ export default { this.headerCheckboxFocused = false; }, onClick() { - if (!this.$refs.overlay || !this.$refs.overlay.contains(event.target)) { + if (!this.disabled && (!this.$refs.overlay || !this.$refs.overlay.contains(event.target))) { this.overlayVisible = !this.overlayVisible; this.$refs.focusInput.focus(); } @@ -143,7 +143,7 @@ export default { case 40: if (this.visibleOptions && !this.overlayVisible && event.altKey) { this.overlayVisible = true; - } + } break; //space @@ -190,7 +190,7 @@ export default { }, onOptionKeyDown(event, option) { let listItem = event.target; - + switch(event.which) { //down case 40: @@ -201,7 +201,7 @@ export default { event.preventDefault(); break; - + //up case 38: var prevItem = this.findPrevItem(listItem); @@ -211,7 +211,7 @@ export default { event.preventDefault(); break; - + //enter case 13: this.onOptionSelect(event, option); @@ -351,7 +351,7 @@ export default { } else { return this.value && this.options && (this.value.length > 0 && this.value.length === this.options.length); - } + } } } } diff --git a/src/views/multiselect/MultiSelectDoc.vue b/src/views/multiselect/MultiSelectDoc.vue index 1d4c086d0c..28e5e4165f 100644 --- a/src/views/multiselect/MultiSelectDoc.vue +++ b/src/views/multiselect/MultiSelectDoc.vue @@ -127,7 +127,7 @@ data() { filter boolean - true + false When specified, displays an input field to filter the items on keyup.