mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-26 07:01:16 +03:00
feat: save Chatflow title when the ENTER key is pressed or discard upon ESC is pressed (#3265)
This simple event handler improves the usability of the UI by avoiding having to use the mouse to save or dicard title changes
This commit is contained in:
committed by
GitHub
parent
eafa06015a
commit
b8b34832b4
@@ -310,6 +310,13 @@ const CanvasHeader = ({ chatflow, isAgentCanvas, handleSaveFlow, handleDeleteFlo
|
||||
ml: 2
|
||||
}}
|
||||
defaultValue={flowName}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
submitFlowName()
|
||||
} else if (e.key === 'Escape') {
|
||||
setEditingFlowName(false)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<ButtonBase title='Save Name' sx={{ borderRadius: '50%' }}>
|
||||
<Avatar
|
||||
|
||||
Reference in New Issue
Block a user