fix: ctrl+enter trigger auto hegiht
This commit is contained in:
@@ -840,6 +840,8 @@ export default function ChatBOX(props: {
|
||||
if (event.ctrlKey && event.code === "Enter") {
|
||||
send(event.target.value, true);
|
||||
setInputMsg("");
|
||||
event.target.value = "";
|
||||
autoHeight(event);
|
||||
return;
|
||||
}
|
||||
autoHeight(event);
|
||||
|
||||
@@ -5,4 +5,5 @@ export const autoHeight = (event: any) => {
|
||||
event.target.scrollHeight,
|
||||
window.innerHeight * 0.7
|
||||
)}px`;
|
||||
console.log("set auto height", event.target.style.height);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user