fix: "enter" updates conversation title

master
Avraham Sakal 3 weeks ago
parent 542b6e45c3
commit 67841355ac

@ -505,6 +505,16 @@ export default function ChatPage() {
// onChange={(e) => { // onChange={(e) => {
// setConversationTitle(e.target.value); // 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) => { onBlur={(e) => {
updateConversationTitle.mutateAsync({ updateConversationTitle.mutateAsync({
id: conversationId, id: conversationId,

Loading…
Cancel
Save