fix: change storyForm revalidation strategy

This commit is contained in:
MTG2000
2022-06-15 16:38:54 +03:00
parent 3d71ed0059
commit f5eee8691e
2 changed files with 9 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
import { useDebouncedCallback } from '@react-hookz/web';
import { useHelpers, useRemirrorContext } from '@remirror/react';
import { Control, useController } from 'react-hook-form';
import { useDebouncedCallback } from '@react-hookz/web';
interface Props {
control?: Control,
@@ -17,6 +17,7 @@ export default function SaveModule(props: Props) {
const { getMarkdown } = useHelpers();
const changeCallback = useDebouncedCallback(ctx => {
const { state } = ctx;
const md = getMarkdown(state);
onChange(md);
@@ -24,7 +25,6 @@ export default function SaveModule(props: Props) {
useRemirrorContext(changeCallback)
// useEvent('focus', () => onBlur())
return <></>
}