feat: enable autofocus to the new chatflow title to improve usability (#3260)

This dialog has only one input and it is the primary one, there is no need for an extra click to be able to set the title
This commit is contained in:
Humberto Rodríguez A.
2024-09-26 16:08:35 +02:00
committed by GitHub
parent 18f916a7e1
commit 9f6fcb9cf6
@@ -24,12 +24,15 @@ const SaveChatflowDialog = ({ show, dialogProps, onCancel, onConfirm }) => {
onClose={onCancel}
aria-labelledby='alert-dialog-title'
aria-describedby='alert-dialog-description'
disableRestoreFocus // needed due to StrictMode
>
<DialogTitle sx={{ fontSize: '1rem' }} id='alert-dialog-title'>
{dialogProps.title}
</DialogTitle>
<DialogContent>
<OutlinedInput
// eslint-disable-next-line jsx-a11y/no-autofocus
autoFocus
sx={{ mt: 1 }}
id='chatflow-name'
type='text'