feat: save a new Chatflow when the `ENTER` key is pressed (#3261)
This simple event handler improve the usability of the UI by avoiding having to use the mouse or having to tab twice and then hit enter to save a flow
This commit is contained in:
parent
9f6fcb9cf6
commit
eafa06015a
|
|
@ -40,6 +40,9 @@ const SaveChatflowDialog = ({ show, dialogProps, onCancel, onConfirm }) => {
|
||||||
placeholder='My New Chatflow'
|
placeholder='My New Chatflow'
|
||||||
value={chatflowName}
|
value={chatflowName}
|
||||||
onChange={(e) => setChatflowName(e.target.value)}
|
onChange={(e) => setChatflowName(e.target.value)}
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (isReadyToSave && e.key === 'Enter') onConfirm(e.target.value)
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue