-
-
Notifications
You must be signed in to change notification settings - Fork 50.8k
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: add a focusTriggerAfterClose prop to Modal for passing down to rc-dialog #27985
feat: add a focusTriggerAfterClose prop to Modal for passing down to rc-dialog #27985
Conversation
feature branch |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 3a0304f:
|
Codecov Report
@@ Coverage Diff @@
## feature #27985 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 392 392
Lines 7343 7344 +1
Branches 2044 2095 +51
=========================================
+ Hits 7343 7344 +1
Continue to review full report at Codecov.
|
|
Hi! Right, I wasn't sure if typings fix is either a bugfix or a feature. Thanks, fixed. |
@molokovev PR contains other commit. Pls help to clean up. |
- set default value to true, similarly to rc-dialog - add comments to the Modal docs. CN is google-translated though.
26d4507
to
87e1132
Compare
Removed other commits |
From code review suggestions Co-authored-by: 偏右 <afc163@gmail.com>
Also:
🤔 This is a ...
💡 Background and solution
I've faced an issue when after selecting something in a Modal I need to close it and to update a global state and then an input is supposed to reflect to redux action and being focused. But the antd's Modal focuses back the modal activating button after hide animation ends.
That's why this props would help. Actually, this prop can be set right now but without TS support though.
📝 Changelog
focusTriggerAfterClose
prop is added to Modal props type definitions☑️ Self Check before Merge
View rendered components/modal/index.en-US.md
View rendered components/modal/index.zh-CN.md