submit on ctrl-enter
parent
16ad81f403
commit
6b271a41c1
|
@ -263,6 +263,8 @@ export default function MessageInput(props: MessageInputProps) {
|
|||
const hotkeyHandler = useMemo(() => {
|
||||
const keys = [
|
||||
['Escape', blur, { preventDefault: true }],
|
||||
['ctrl+Enter', onSubmit, { preventDefault: true }],
|
||||
|
||||
];
|
||||
if (submitOnEnter) {
|
||||
keys.unshift(['Enter', onSubmit, { preventDefault: true }]);
|
||||
|
|
Loading…
Reference in New Issue