-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConfirmDialog/ConfirmPopup: Add defaultFocus
option like PrimeVue
#4051
Labels
Type: New Feature
Issue contains a new feature or new component request
Milestone
Comments
KOliver94
added
Status: Discussion
Issue or pull request needs to be discussed by Core Team
Type: New Feature
Issue contains a new feature or new component request
labels
Feb 14, 2023
github-actions
bot
added
the
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
label
Feb 14, 2023
melloware
changed the title
ConfirmDialog: Add option to autoFocus reject button
ConfirmDialog: Add Feb 14, 2023
defaultFocus
option like PrimeVue
melloware
removed
Status: Discussion
Issue or pull request needs to be discussed by Core Team
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Feb 15, 2023
melloware
added a commit
to melloware/primereact
that referenced
this issue
Nov 26, 2023
melloware
changed the title
ConfirmDialog: Add
ConfirmDialog/ConfirmPopup: Add Nov 26, 2023
defaultFocus
option like PrimeVuedefaultFocus
option like PrimeVue
melloware
added a commit
that referenced
this issue
Nov 27, 2023
github-actions
bot
added
the
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
label
Jan 8, 2024
melloware
removed
the
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
label
Jan 8, 2024
melloware
added a commit
to melloware/primereact
that referenced
this issue
Jan 8, 2024
Fix primefaces#5556 Fix primefaces#5487 Fix primefaces#5457 Fix primefaces#5370 Fix primefaces#4051
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature you would like to see added
The basic
confirmDialog
is a perfect solution for getting the user's confirmation before execution. However, in some cases I would like to not have the accept button highlighted for example on a delete confirmation. For a delete I would like to have the reject selected as default to avoid accidential consequences of keyboard button pressing.Is your feature request related to a problem?
Right now I can swap the accept and reject buttons but it's logically not right and the places also swap. Another way is to create my own footer but this way the component lose its ease of use and I mostly need to copy the original implementation and set the
autoFocus
on the other button.Describe the solution you'd like
It would be great if we could have a
focusReject
boolean prop for Confirm Dialog which isfalse
by default. If the user sets it totrue
the reject button would be auto focused instead of the accept one.I would change this part:
primereact/components/lib/confirmdialog/ConfirmDialog.js
Lines 115 to 116 in 5edbb9f
to something like that:
Describe alternatives you have considered
No response
Additional context
The same could be done for
confirmPopup
.The text was updated successfully, but these errors were encountered: