no log: Try to fix some issues with chip component

pull/1638/head
LASER-Yi 3 years ago
parent 0af9647a6a
commit 65e9a029fe
No known key found for this signature in database
GPG Key ID: BB28903D50A1D408

@ -14,8 +14,8 @@ const SplitKeys = ["Tab", "Enter", " ", ",", ";"];
export interface ChipsProps {
disabled?: boolean;
defaultValue?: readonly string[];
value?: readonly string[];
defaultValue?: string[];
value?: string[];
onChange?: (v: string[]) => void;
}
@ -25,7 +25,7 @@ export const Chips: FunctionComponent<ChipsProps> = ({
disabled,
onChange,
}) => {
const [chips, setChips] = useState(() => {
const [chips, setChips] = useState<string[]>(() => {
if (value) {
return value;
}

Loading…
Cancel
Save