fix: "enter" updates conversation title
This commit is contained in:
@@ -505,6 +505,16 @@ export default function ChatPage() {
|
||||
// onChange={(e) => {
|
||||
// setConversationTitle(e.target.value);
|
||||
// }}
|
||||
onKeyUp={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
// updateConversationTitle.mutateAsync({
|
||||
// id: conversationId,
|
||||
// title: e.currentTarget.value,
|
||||
// });
|
||||
e.currentTarget.blur();
|
||||
}
|
||||
}}
|
||||
onBlur={(e) => {
|
||||
updateConversationTitle.mutateAsync({
|
||||
id: conversationId,
|
||||
|
||||
Reference in New Issue
Block a user