Fix text obscuring

This commit is contained in:
Gregory Schier
2023-03-30 17:22:52 -07:00
parent 60d4ecda1a
commit 68159dfa95

View File

@@ -48,7 +48,7 @@ export function Editor({ defaultValue, forceUpdateKey, ...props }: EditorProps)
// NOTE: This was originally done to fix a bug where the editor would unmount
// and remount after the first change event, something to do with React
// StrictMode. This fixes it, though, and actually makes more sense
const fixedDefaultValue = useMemo(() => defaultValue, [forceUpdateKey]);
const fixedDefaultValue = useMemo(() => defaultValue, [forceUpdateKey, props.type]);
return <_Editor defaultValue={fixedDefaultValue} {...props} />;
}