Skip to content

Commit

Permalink
Merge pull request #660 from joriewong/hotfix/select
Browse files Browse the repository at this point in the history
fix(select): fix multiple tag remove
  • Loading branch information
honkinglin authored Apr 21, 2022
2 parents aa5a996 + dedb2ee commit d1d3ac3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/select/util/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,11 @@ export const getSelectValueArr = (
if (Array.isArray(values)) {
let currentValues = [...values];
const isValueObj = valueType === 'object';

if (selected) {
currentValues = currentValues.filter((item: SelectLabeledValue) => {
if (isValueObj) {
if (isPlainObject(activeValue)) {
return get(item, keys?.value || 'value') !== get(activeValue, 'data');
return get(item, keys?.value || 'value') !== get(activeValue, keys?.value || 'value');
}
return get(item, keys?.value || 'value') !== activeValue;
}
Expand Down

0 comments on commit d1d3ac3

Please sign in to comment.