fix: Fixes issue where pasting in a new Super note would not save it

This commit is contained in:
Aman Harwara
2023-02-16 14:40:32 +05:30
parent ed5a189745
commit 91a8023fa4
2 changed files with 1 additions and 4 deletions

View File

@@ -58,9 +58,7 @@ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
handleEditorChange(editorState, previewLength, onChange)
})
},
// Ignoring 'ignoreFirstChange' and 'previewLength'
// eslint-disable-next-line react-hooks/exhaustive-deps
[onChange, didIgnoreFirstChange],
[ignoreFirstChange, didIgnoreFirstChange, previewLength, onChange],
)
const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null)

View File

@@ -177,7 +177,6 @@ export const SuperEditor: FunctionComponent<Props> = ({
>
<BlocksEditor
onChange={handleChange}
ignoreFirstChange={controller.isTemplateNote}
className={classNames(
'blocks-editor relative h-full resize-none px-4 py-4 focus:shadow-none focus:outline-none',
lineHeight && `leading-${lineHeight.toLowerCase()}`,