Skip to content

Commit

Permalink
fix(pro:tag-select): removing unselected tag data shouldn't emit tagR…
Browse files Browse the repository at this point in the history
…emove (#1880)
  • Loading branch information
sallerli1 committed Apr 8, 2024
1 parent 4f48690 commit c3703a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/pro/tag-select/src/composables/useSelectedState.ts
Expand Up @@ -71,6 +71,11 @@ export function useSelectedState(
return
}

const newSelectedValue = selectedValue.value?.filter(item => key !== item)
if (newSelectedValue?.length === selectedValue.value?.length) {
return
}

setSelectedValue(selectedValue.value?.filter(item => key !== item))
callEmit(props.onTagRemove, data)
}
Expand Down

0 comments on commit c3703a8

Please sign in to comment.