Skip to content

Commit

Permalink
Merge pull request #391 from Tencent/feat/taginput/defaultvalue
Browse files Browse the repository at this point in the history
fix: 兼容 TagInput value defaultValue 都未设置场景
  • Loading branch information
uyarn authored Feb 25, 2022
2 parents 692dd43 + a317786 commit d48cb5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tag-input/useTagList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function useTagList(props: TagInputProps) {
// handle controlled property and uncontrolled property
const [tagValue, setTagValue] = useDefault<TdTagInputProps['value'], [TagInputChangeContext]>(
props.value,
props.defaultValue,
props.defaultValue || [],
props.onChange,
);
const [oldInputValue, setOldInputValue] = useState<InputValue>();
Expand Down

0 comments on commit d48cb5a

Please sign in to comment.