mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-02-04 01:32:54 +08:00
add missing dependency values
This commit is contained in:
parent
752d913d8d
commit
c0e5e4e190
@ -91,7 +91,7 @@ const JsonEditor: React.FC<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
setValue(json);
|
setValue(json);
|
||||||
}, [json]);
|
}, [config.autoformat, json]);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const formatTimer = setTimeout(() => {
|
const formatTimer = setTimeout(() => {
|
||||||
@ -107,7 +107,7 @@ const JsonEditor: React.FC<{
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
return () => clearTimeout(formatTimer);
|
return () => clearTimeout(formatTimer);
|
||||||
}, [value, config.autoformat]);
|
}, [value, config.autoformat, setJson]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledEditorWrapper>
|
<StyledEditorWrapper>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user