mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-12 03:43:01 +02:00
fix: update useEffect dependencies and reset lastUpdated state after onChange #963
This commit is contained in:
@@ -167,8 +167,9 @@ export const TextField: React.FunctionComponent<ITextFieldProps> = ({
|
||||
useEffect(() => {
|
||||
if (debouncedText !== undefined && value !== debouncedText && lastUpdated !== null) {
|
||||
onChange(debouncedText || '');
|
||||
setLastUpdated(null);
|
||||
}
|
||||
}, [debouncedText, value, lastUpdated]);
|
||||
}, [debouncedText, value, lastUpdated, onChange]);
|
||||
|
||||
return (
|
||||
<div className={`metadata_field`}>
|
||||
|
||||
Reference in New Issue
Block a user