Skip to content

Commit 09d1057

Browse files
committed
fix: Avoid restarting autocompletion after selecting option
Debouncing ensures the native suggestion UI does not reappear after selecting an suggestion.
1 parent 9fe1cdf commit 09d1057

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/components/editor/use-at-autocompleter.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ function addAtSymbolCompleter( completers = [] ) {
5252
// Return empty array since we're not providing actual completion options
5353
return [];
5454
},
55-
getOptionLabel: () => '',
56-
getOptionCompletion: () => '@',
55+
isDebounced: true,
5756
};
5857

5958
return [ ...completers, atSymbolCompleter ];

src/components/editor/use-plus-autocompleter.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ function addPlusSymbolCompleter( completers = [] ) {
4646
// Return empty array since we're not providing actual completion options
4747
return [];
4848
},
49-
getOptionLabel: () => '',
50-
getOptionCompletion: () => '+',
49+
isDebounced: true,
5150
};
5251

5352
return [ ...completers, plusSymbolCompleter ];

0 commit comments

Comments
 (0)