mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
ColorInput: fix initial field state
This commit is contained in:
parent
768549ce86
commit
52ce332f09
@ -37,8 +37,7 @@ function padHex(hex: string) {
|
||||
export function ColorInput(props: ColorInputProps) {
|
||||
const { id, placeholder, label, caption, disabled, ...rest } = props;
|
||||
const [{ value, onBlur }, meta, { setValue, setTouched }] = useField(id);
|
||||
const [field, setField] = useState('');
|
||||
// const [error, setError] = useState<string | undefined>();
|
||||
const [field, setField] = useState(uxToHex(value));
|
||||
|
||||
useEffect(() => {
|
||||
const newValue = hexToUx(padHex(field));
|
||||
|
Loading…
Reference in New Issue
Block a user