-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
fix: Dropdown should respect trigger's disabled prop #47363
base: master
Are you sure you want to change the base?
Conversation
Run & review this pull request in StackBlitz Codeflow. |
👁 Visual Regression Report for PR #47363 Passed ✅
🎊 Congrats! No visual-regression diff found. |
size-limit report 📦
|
components/dropdown/dropdown.tsx
Outdated
}); | ||
}; | ||
if (typeof disabled !== 'undefined') { | ||
dropdownTriggerProps.disabled = disabled; |
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.
HOC 和 context 都不会生效:
<ConfigProvider componentDisabled>
<Dropdown><Button /></Dropdown>
</ConfigProvider>
直接到 feature 里把这个 disabled 传导去了要不?
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.
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.
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #47363 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 746 746
Lines 12996 12997 +1
Branches 3412 3413 +1
=========================================
+ Hits 12996 12997 +1 ☔ View full report in Codecov by Sentry. |
0d8a91c
to
a8e25a1
Compare
a8e25a1
to
c59e3c1
Compare
c59e3c1
to
14a3155
Compare
14a3155
to
6497874
Compare
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
disabled
prop not working when it is Dropdown's children.disabled
属性不生效的问题。☑️ Self-Check before Merge