Skip to content

Commit

Permalink
fix: default group deselect #1754
Browse files Browse the repository at this point in the history
  • Loading branch information
akki-jat authored and mattelen committed Apr 9, 2024
1 parent 296707c commit ed0005b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/multiselectMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,9 @@ export default {
if (this.wholeGroupSelected(group)) {
this.$emit('remove', group[this.groupValues], this.id)

const groupValues = this.trackBy ? group[this.groupValues].map(val => val[this.trackBy]) : group[this.groupValues]
const newValue = this.internalValue.filter(
(option) => group[this.groupValues].indexOf(option) === -1
(option) => groupValues.indexOf(this.trackBy ? option[this.trackBy] : option) === -1
)

this.$emit('update:modelValue', newValue)
Expand Down

0 comments on commit ed0005b

Please sign in to comment.