Merge pull request #1671 from aidanbennettjones/AidanComponentEditChat

Enables Enter Key Functionality to Submit Edited Chats
This commit is contained in:
Alex
2025-03-06 16:44:06 -05:00
committed by GitHub

View File

@@ -135,7 +135,15 @@ const ConversationBubble = forwardRef<
>
<textarea
placeholder={t('conversation.edit.placeholder')}
onChange={(e) => setEditInputBox(e.target.value)}
onChange={(e) => {
setEditInputBox(e.target.value);
}}
onKeyDown={(e) => {
if(e.key === 'Enter' && !e.shiftKey){
e.preventDefault();
handleEditClick();
}
}}
rows={5}
value={editInputBox}
className="w-full resize-none border-2 border-black dark:border-white rounded-3xl px-4 py-3 text-base leading-relaxed text-black dark:bg-raisin-black dark:text-white focus:outline-none focus:ring-2 focus:ring-[#CDB5FF]"