Skip to content
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

Merged
merged 5 commits into from
Jun 2, 2022

Conversation

Clebal
Copy link
Contributor

@Clebal Clebal commented Jun 2, 2022

Added disabled: boolean = false property to WrapperWidgetUI props.

@Clebal Clebal requested a review from VictorVelarde June 2, 2022 13:11
@coveralls
Copy link
Collaborator

coveralls commented Jun 2, 2022

Pull Request Test Coverage Report for Build 2428593376

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 72.658%

Totals Coverage Status
Change from base Build 2420534079: 0.01%
Covered Lines: 1589
Relevant Lines: 2052

💛 - 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]),
Copy link
Contributor

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;
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

@VictorVelarde VictorVelarde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@Clebal Clebal merged commit dc29d15 into master Jun 2, 2022
@Clebal Clebal deleted the sclebal/allow-to-disable-wrapper-widget-ui branch June 2, 2022 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants