-
Notifications
You must be signed in to change notification settings - Fork 103
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): renderChildren use mergedVisible for calculation #190
Conversation
给一下问题本身。 |
#179 这个Issue也是同样的问题 |
Codecov Report
@@ Coverage Diff @@
## master #190 +/- ##
=======================================
Coverage 98.52% 98.52%
=======================================
Files 2 2
Lines 68 68
Branches 22 22
=======================================
Hits 67 67
Misses 1 1
Continue to review full report at Codecov.
|
@@ -138,7 +138,7 @@ function Dropdown(props: DropdownProps, ref) { | |||
const { children } = props; | |||
const childrenProps = children.props ? children.props : {}; | |||
const childClassName = classNames(childrenProps.className, getOpenClassName()); | |||
return triggerVisible && children | |||
return mergedVisible && children |
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.
加好了
lint的要fix吗?是以前遗留的代码 |
一起修了吧 |
a23c76f
to
347045c
Compare
都修好了 |
renderChildren使用triggerVisible导致受控时上下层组件状态不一致。此处改为mergedVisible