fix: save edit message on blur
This commit is contained in:
@@ -66,7 +66,7 @@ export function EditMessage(props: EditMessageProps) {
|
|||||||
: "string message"}
|
: "string message"}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<Button onClick={() => setShowEdit(false)}>Save & Close</Button>
|
<Button onClick={() => setShowEdit(false)}>Close</Button>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ export function EditMessageString({ chat, setShowEdit }: Props) {
|
|||||||
<Textarea
|
<Textarea
|
||||||
className="w-full h-32 my-2"
|
className="w-full h-32 my-2"
|
||||||
value={chat.content}
|
value={chat.content}
|
||||||
onChange={(event) => {
|
onBlur={(event) => {
|
||||||
chat.content = event.target.value;
|
chat.content = event.target.value;
|
||||||
chat.token = calculate_token_length(chat.content);
|
chat.token = calculate_token_length(chat.content);
|
||||||
setChatStore({ ...chatStore });
|
setChatStore({ ...chatStore });
|
||||||
|
|||||||
Reference in New Issue
Block a user