mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-27 17:36:25 +02:00
fix copilot compose text bug
This commit is contained in:
parent
120dbd24e9
commit
bf51dd442d
1 changed files with 5 additions and 0 deletions
|
|
@ -35,6 +35,11 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(({
|
|||
const [validationError, setValidationError] = useState<string | undefined>();
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
|
||||
// update local value when prop value changes
|
||||
useEffect(() => {
|
||||
setLocalValue(propValue as string);
|
||||
}, [propValue]);
|
||||
|
||||
// Sync local state with prop value when not editing
|
||||
useEffect(() => {
|
||||
if (!isEditing) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue