Fix formatting
This commit is contained in:
parent
dd02b69036
commit
00836dbf9e
1 changed files with 20 additions and 17 deletions
|
|
@ -55,7 +55,8 @@ const DynamicJsonForm = ({
|
||||||
const timeoutRef = useRef<ReturnType<typeof setTimeout>>();
|
const timeoutRef = useRef<ReturnType<typeof setTimeout>>();
|
||||||
|
|
||||||
// Create a debounced function to update parent state
|
// Create a debounced function to update parent state
|
||||||
const debouncedUpdateParent = useCallback((jsonString: string) => {
|
const debouncedUpdateParent = useCallback(
|
||||||
|
(jsonString: string) => {
|
||||||
// Clear any existing timeout
|
// Clear any existing timeout
|
||||||
if (timeoutRef.current) {
|
if (timeoutRef.current) {
|
||||||
clearTimeout(timeoutRef.current);
|
clearTimeout(timeoutRef.current);
|
||||||
|
|
@ -71,7 +72,9 @@ const DynamicJsonForm = ({
|
||||||
// Don't set error during normal typing
|
// Don't set error during normal typing
|
||||||
}
|
}
|
||||||
}, 300);
|
}, 300);
|
||||||
}, [onChange, setJsonError]);
|
},
|
||||||
|
[onChange, setJsonError],
|
||||||
|
);
|
||||||
|
|
||||||
// Update rawJsonValue when value prop changes
|
// Update rawJsonValue when value prop changes
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue