@mozaic-ds/vue 0.35.0-beta.3 → 0.35.0-beta.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mozaic-ds/vue",
3
- "version": "0.35.0-beta.3",
3
+ "version": "0.35.0-beta.4",
4
4
  "description": "Vue.js implementation of Mozaic Design System",
5
5
  "author": "Adeo - Mozaic Design System",
6
6
  "scripts": {
@@ -312,6 +312,7 @@ export default {
312
312
  },
313
313
  clearListbox() {
314
314
  this.listboxValue = this.multiple ? [] : undefined;
315
+ this.$emit('change', this.listboxValue);
315
316
  this.$emit('clear');
316
317
  },
317
318
  onClear() {
@@ -261,9 +261,11 @@ export default {
261
261
  getSelectedItems(val) {
262
262
  const value = val ? val : this.listboxValue;
263
263
 
264
- const selectedItems = this.items.filter((item) =>
265
- value.includes(item[this.dataValueExpr])
266
- );
264
+ const selectedItems = this.items.filter((item) => {
265
+ return this.multiple
266
+ ? value.includes(item[this.dataValueExpr])
267
+ : value === item[this.dataValueExpr];
268
+ });
267
269
 
268
270
  return selectedItems;
269
271
  },