-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat: isConfirmDangerProp #1110
feat: isConfirmDangerProp #1110
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1110 +/- ##
==========================================
+ Coverage 42.91% 42.93% +0.02%
==========================================
Files 434 434
Lines 32596 32598 +2
Branches 8202 8204 +2
==========================================
+ Hits 13989 13997 +8
+ Misses 18558 18552 -6
Partials 49 49
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -64,8 +67,12 @@ function BasicModal(props: BasicModalProps) { | |||
}, [onConfirm, onModalDisable]); | |||
|
|||
const onOpened = useCallback(() => { | |||
confirmButton.current?.focus(); | |||
}, []); | |||
if (isConfirmDanger) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably trust the user and keep the focus on the primary action.
test: Added test for prop
resolves #1109