mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 13:29:02 +08:00
feat: add setting workspace UI
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { InputHTMLAttributes, useState } from 'react';
|
||||
import { InputHTMLAttributes, useEffect, useState } from 'react';
|
||||
import { StyledInput } from './style';
|
||||
|
||||
type inputProps = {
|
||||
@@ -29,6 +29,9 @@ export const Input = (props: inputProps) => {
|
||||
const handleBlur: InputHTMLAttributes<HTMLInputElement>['onBlur'] = e => {
|
||||
onBlur && onBlur(e);
|
||||
};
|
||||
useEffect(() => {
|
||||
setValue(valueProp || '');
|
||||
}, [valueProp]);
|
||||
return (
|
||||
<StyledInput
|
||||
value={value}
|
||||
|
||||
Reference in New Issue
Block a user