Skip to content

Commit

Permalink
fix(list-picker): fix multiple value error (#1526)
Browse files Browse the repository at this point in the history
  • Loading branch information
berber1016 authored Nov 25, 2021
1 parent e95fb9a commit 520f170
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/list-picker/listPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ const ListPicker: React.FC<ListPickerProps> = (props) => {
}, [controlledValue, getLabelByValue, separator, options]);

useEffect(() => {
if (!needConfim) {
setValue(controlledValue);
}
}, [controlledValue, needConfim, setValue]);
setValue(controlledValue);
}, [controlledValue, setValue]);
useEffect(() => {
if (needConfim && !visible && !isEqual(controlledValue, value)) {
setValue(controlledValue);
Expand Down

1 comment on commit 520f170

@vercel
Copy link

@vercel vercel bot commented on 520f170 Nov 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.