Skip to content

Commit

Permalink
feat: enable autofocus to the new chatflow title to improve usabili…
Browse files Browse the repository at this point in the history
…ty (#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
  • Loading branch information
rhumbertgz authored and 0xi4o committed Sep 30, 2024
1 parent 2a64343 commit e4e7de5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/ui/src/ui-component/dialog/SaveChatflowDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit e4e7de5

Please sign in to comment.