TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
5.91k stars 386 forks source link

fix: add memoization in suggestion menu #796

Closed YousefED closed 1 month ago

YousefED commented 1 month ago

Maybe related: https://github.com/TypeCellOS/BlockNote/issues/778

My assumption is there is a race condition because the event handler (useUIstate) keeps getting attached / detached. This should improve that, but regardless it's a nice cleanup anyway

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Jun 3, 2024 10:25am
blocknote-website ✅ Ready (Inspect) Visit Preview Jun 3, 2024 10:25am
matthewlipski commented 1 month ago

Tried it out in a NextJS 14 BlockNote project I had set up and unfortunately #778 doesn't get fixed with these changes:( The mentions menu remains open no matter how many characters you add to the query. However, think it's still worth merging this since it's a nice cleanup, just edited your comment so it doesn't close the issue.