-
Notifications
You must be signed in to change notification settings - Fork 23
feat(button): add controlled component functionality to SplitButton #1685
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(button): add controlled component functionality to SplitButton #1685
Conversation
🚀 Deployed on https://pr-1685--dhis2-ui.netlify.app |
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.
LGTM!
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.
Looks good!
I have a readability tip: since typeof this.props.open === 'boolean'
is used a lot, you could maybe make a method to reuse that:
isControlled = () => typeof this.props.open === 'boolean'
that you could then use:
const open = this.isControlled() ? this.props.open : this.state.open
|
# [10.7.0](v10.6.0...v10.7.0) (2025-05-19) ### Features * **button:** add controlled component functionality to SplitButton ([#1685](#1685)) ([f027b0b](f027b0b))
Summary:
open
andonToggle
FlyoutMenu
&Modal
)