@itfin/components 2.0.38 → 2.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -171,7 +171,20 @@ class FilterFacetsList extends Vue {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
groupSelected(value, items) {
|
|
174
|
-
|
|
174
|
+
let newVal = this.value ? [...Array.isArray(this.value) ? this.value : [this.value]] : [];
|
|
175
|
+
if (value) {
|
|
176
|
+
items.forEach((item) => {
|
|
177
|
+
const itemValue = `${item.value}`;
|
|
178
|
+
if (!newVal.includes(itemValue)) {
|
|
179
|
+
newVal.push(itemValue);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
} else {
|
|
183
|
+
items.forEach((item) => {
|
|
184
|
+
const itemValue = `${item.value}`;
|
|
185
|
+
newVal = newVal.filter(val => val !== itemValue);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
175
188
|
this.$emit('input', this.multiple ? newVal : (newVal.length > 0 ? newVal[0] : null));
|
|
176
189
|
}
|
|
177
190
|
|