tab autocomplete for slash commands
This commit is contained in:
parent
f4664228b0
commit
ccca93eb18
1 changed files with 3 additions and 0 deletions
|
|
@ -113,6 +113,9 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
|
|||
(event.nativeEvent as any).preventDownshiftDefault = true;
|
||||
if (props.onEnter) props.onEnter(event);
|
||||
setInputValue("");
|
||||
} else if (event.key === "Tab" && items.length > 0) {
|
||||
setInputValue(items[0].name);
|
||||
event.preventDefault();
|
||||
}
|
||||
},
|
||||
ref: ref as any,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue