@@ -154,6 +154,14 @@ export default {
showToggleAll: {
type: Boolean,
default: true
+ },
+ loading: {
+ type: Boolean,
+ default: false
+ },
+ loadingIcon: {
+ type: String,
+ default: 'pi pi-spinner pi-spin'
}
},
data() {
@@ -244,7 +252,11 @@ export default {
this.headerCheckboxFocused = false;
},
onClick(event) {
- if (!this.disabled && (!this.overlay || !this.overlay.contains(event.target)) && !DomHandler.hasClass(event.target, 'p-multiselect-close')) {
+ if (this.disabled || this.loading) {
+ return;
+ }
+
+ if ((!this.overlay || !this.overlay.contains(event.target)) && !DomHandler.hasClass(event.target, 'p-multiselect-close')) {
DomHandler.hasClass(event.target, 'p-multiselect-close');
if (this.overlayVisible)
this.hide();
@@ -631,6 +643,9 @@ export default {
},
maxSelectionLimitReached() {
return this.selectionLimit && (this.modelValue && this.modelValue.length === this.selectionLimit);
+ },
+ dropdownIconClass() {
+ return ['p-multiselect-trigger-icon', this.loading ? this.loadingIcon : 'pi pi-chevron-down'];
}
},
directives: {
diff --git a/src/views/cascadeselect/CascadeSelectDemo.vue b/src/views/cascadeselect/CascadeSelectDemo.vue
index b1eeb30ff..337f6a41d 100644
--- a/src/views/cascadeselect/CascadeSelectDemo.vue
+++ b/src/views/cascadeselect/CascadeSelectDemo.vue
@@ -26,6 +26,9 @@
+
+ Loading State
+
diff --git a/src/views/cascadeselect/CascadeSelectDoc.vue b/src/views/cascadeselect/CascadeSelectDoc.vue
index c606bf073..4f939c20b 100644
--- a/src/views/cascadeselect/CascadeSelectDoc.vue
+++ b/src/views/cascadeselect/CascadeSelectDoc.vue
@@ -219,6 +219,18 @@ data() {
string |
null |
Style class of the overlay panel. |
+
+
+ loading |
+ boolean |
+ false |
+ Whether the dropdown is in loading state. |
+
+
+ loadingIcon |
+ string |
+ pi pi-spinner pi-spin |
+ Icon to display in loading state. |
@@ -368,6 +380,9 @@ export default {
+
+ Loading State
+
@@ -487,6 +502,9 @@ img {
+
+ Loading State
+
diff --git a/src/views/dropdown/DropdownDemo.vue b/src/views/dropdown/DropdownDemo.vue
index dcc53eb0f..b63e97daa 100755
--- a/src/views/dropdown/DropdownDemo.vue
+++ b/src/views/dropdown/DropdownDemo.vue
@@ -44,6 +44,9 @@
+
+ Loading State
+
diff --git a/src/views/dropdown/DropdownDoc.vue b/src/views/dropdown/DropdownDoc.vue
index 2365d8e3e..42a671a8b 100755
--- a/src/views/dropdown/DropdownDoc.vue
+++ b/src/views/dropdown/DropdownDoc.vue
@@ -275,6 +275,18 @@ export default {
string |
null |
Style class of the overlay panel. |
+
+
+ loading |
+ boolean |
+ false |
+ Whether the dropdown is in loading state. |
+
+
+ loadingIcon |
+ string |
+ pi pi-spinner pi-spin |
+ Icon to display in loading state. |
@@ -508,6 +520,9 @@ export default {
+
+ Loading State
+
@@ -622,6 +637,9 @@ export default {
+
+ Loading State
+
diff --git a/src/views/multiselect/MultiSelectDemo.vue b/src/views/multiselect/MultiSelectDemo.vue
index 9096296c5..025f7bab2 100755
--- a/src/views/multiselect/MultiSelectDemo.vue
+++ b/src/views/multiselect/MultiSelectDemo.vue
@@ -44,6 +44,9 @@
+
+ Loading State
+
diff --git a/src/views/multiselect/MultiSelectDoc.vue b/src/views/multiselect/MultiSelectDoc.vue
index 43061c32a..2d3d65bb9 100755
--- a/src/views/multiselect/MultiSelectDoc.vue
+++ b/src/views/multiselect/MultiSelectDoc.vue
@@ -289,6 +289,18 @@ export default {
boolean |
true |
Whether to show the header checkbox to toggle the selection of all items at once. |
+
+
+ loading |
+ boolean |
+ false |
+ Whether the multiselect is in loading state. |
+
+
+ loadingIcon |
+ string |
+ pi pi-spinner pi-spin |
+ Icon to display in loading state. |
@@ -509,6 +521,9 @@ export default {
+
+ Loading State
+
@@ -642,6 +657,9 @@ export default {
+
+ Loading State
+