fix copilot compose text bug

This commit is contained in:
Ramnique Singh 2025-04-08 16:08:31 +05:30
parent 120dbd24e9
commit bf51dd442d

View file

@ -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) {