-
Notifications
You must be signed in to change notification settings - Fork 16
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
Allow to disable WrapperWidgetUI #420
Conversation
Pull Request Test Coverage Report for Build 2428593376
💛 - Coveralls |
@@ -197,7 +197,7 @@ TableWidgetUI.propTypes = { | |||
rowsPerPageOptions: PropTypes.array, | |||
onSetRowsPerPage: PropTypes.func, | |||
onRowClick: PropTypes.func, | |||
height: PropTypes.string, | |||
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), |
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.
ok, that's a little improv
@@ -158,6 +163,10 @@ function WrapperWidgetUI(props) { | |||
); | |||
}; | |||
|
|||
if (disabled) { | |||
return props.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.
children is always one single element... So no need of a fragment, right?
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.
If more elements are passed, the user would have to put the fragment by theirself
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.
👍🏻
Added
disabled: boolean = false
property to WrapperWidgetUI props.