wave-ui 3.6.0 → 3.6.1

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": "wave-ui",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "description": "An emerging UI framework for Vue.js (2 & 3) with only the bright side. :sunny:",
5
5
  "author": "Antoni Andre <antoniandre.web@gmail.com>",
6
6
  "homepage": "https://antoniandre.github.io/wave-ui",
@@ -347,11 +347,11 @@ export default {
347
347
  // Reset the selections when single selection allowed for w-select.
348
348
  if (!this.isMultipleSelect) this.listItems.forEach(item => (item._selected = false))
349
349
 
350
- this.checkSelection(selection) // Create an array with the selected values.
351
- .forEach(val => {
352
- const foundItem = this.listItems.find(item => item._value === val)
353
- if (foundItem) foundItem._selected = true
354
- })
350
+ const selectedItems = this.checkSelection(selection) // Create an array with the selected values.
351
+ // Update which items are selected or not.
352
+ this.listItems.forEach(item => {
353
+ item._selected = selectedItems.find(val => item._value === val) !== undefined
354
+ })
355
355
  }
356
356
  },
357
357