feat: Tags Input, formProvider decorator

This commit is contained in:
MTG2000
2022-04-27 15:29:18 +03:00
parent af253c980e
commit cad9acdfac
7 changed files with 138 additions and 21 deletions

View File

@@ -1,11 +1,12 @@
import React from 'react'
import React, { useCallback } from 'react'
import { EditorComponent, Remirror, useHelpers, useRemirror, useEvent, useEditorState } from '@remirror/react';
import { Control, useController } from 'react-hook-form';
interface Props {
control?: Control,
name?: string
name?: string,
}
export default function SaveModule(props: Props) {
@@ -17,10 +18,12 @@ export default function SaveModule(props: Props) {
name: props.name ?? 'content'
})
useEvent('blur', () => {
const listener = (d: any) => {
onChange(getMarkdown(state));
onBlur()
})
};
useEvent('blur', listener)
return <></>
}