mirror of
https://github.com/lingke-net/koring-space.git
synced 2026-09-12 05:45:17 +08:00
Forward abort signal to slash suggestions
Update the slash suggestion handler to accept an AbortSignal and pass it through to defaultSlashSuggestions. This enables cancellation of in-flight async suggestion calls (avoids race conditions and wasted work) in components/kibo-ui/editor/index.tsx.
This commit is contained in:
@@ -600,8 +600,8 @@ export const EditorProvider = ({
|
||||
Subscript,
|
||||
Slash.configure({
|
||||
suggestion: {
|
||||
items: async ({ editor, query }) => {
|
||||
const items = await defaultSlashSuggestions({ editor, query });
|
||||
items: async ({ editor, query, signal }) => {
|
||||
const items = await defaultSlashSuggestions({ editor, query, signal });
|
||||
|
||||
if (!query) {
|
||||
return items;
|
||||
|
||||
Reference in New Issue
Block a user