Fix mention list not loading
This commit is contained in:
parent
1e667bd9d8
commit
c04e36e3fe
|
@ -45,7 +45,8 @@ export function useTextEditor(props: {
|
||||||
'box-content min-h-[6em] textarea textarea-bordered text-base'
|
'box-content min-h-[6em] textarea textarea-bordered text-base'
|
||||||
)
|
)
|
||||||
|
|
||||||
const editor = useEditor({
|
const editor = useEditor(
|
||||||
|
{
|
||||||
editorProps: { attributes: { class: editorClass } },
|
editorProps: { attributes: { class: editorClass } },
|
||||||
extensions: [
|
extensions: [
|
||||||
StarterKit.configure({
|
StarterKit.configure({
|
||||||
|
@ -130,7 +131,9 @@ export function useTextEditor(props: {
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
content: defaultValue,
|
content: defaultValue,
|
||||||
})
|
},
|
||||||
|
[!users.length] // passed as useEffect dependency. (re-render editor when users load, to update mention menu)
|
||||||
|
)
|
||||||
|
|
||||||
const upload = useUploadMutation(editor)
|
const upload = useUploadMutation(editor)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user