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

feat(Tab): Added two new props: mountOnEnter and unmountOnExit #2902

Merged
merged 2 commits into from Sep 23, 2019

Conversation

@rebeccaalpert
Copy link
Member

rebeccaalpert commented Sep 10, 2019

When mountOnEnter is provided as a prop, TabContents will mount on the DOM as you click the corresponding tab. When unmountOnExit is provided, TabContents will unmount from the DOM when no longer visible.

Fixes #2609 and #1448.

@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Sep 10, 2019

PatternFly-React preview: https://patternfly-react-pr-2902.surge.sh

@rebeccaalpert rebeccaalpert requested a review from dlabrecq Sep 12, 2019
@tlabaj tlabaj requested a review from jschuler Sep 17, 2019
Copy link
Contributor

tlabaj left a comment

Can you add some integration test to verify these cahnges

Copy link
Contributor

dlabaj left a comment

Looks good just one comment.

When mountOnEnter is provided as a prop, TabContents will mount on the DOM as you click the corresponding tab. When unmountONExit is provided, TabContents will unmount from the DOM when no longer visible.

Fixes #2609
@rebeccaalpert rebeccaalpert force-pushed the rebeccaalpert:tab-mounting branch from ff699f3 to 9d729fd Sep 17, 2019
@rebeccaalpert

This comment has been minimized.

Copy link
Member Author

rebeccaalpert commented Sep 17, 2019

Added integration test and changed from null to undefined. Also fixed minor bug in Tabs where you couldn't actually apply an id to the main Tabs div.

@rebeccaalpert rebeccaalpert force-pushed the rebeccaalpert:tab-mounting branch from 9d729fd to 9903005 Sep 18, 2019
Prior to bugfix, you couldn't add an id to a Tabs divs.
@rebeccaalpert rebeccaalpert force-pushed the rebeccaalpert:tab-mounting branch from 9903005 to 395f628 Sep 20, 2019
@tlabaj
tlabaj approved these changes Sep 23, 2019
Copy link
Contributor

tlabaj left a comment

LGTM

@dlabaj
dlabaj approved these changes Sep 23, 2019
@dlabaj dlabaj merged commit dcc0ccb into patternfly:master Sep 23, 2019
8 checks passed
8 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build_integration Your tests passed on CircleCI!
Details
ci/circleci: build_pf3_docs Your tests passed on CircleCI!
Details
ci/circleci: build_pf4_docs Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test_jest_other Your tests passed on CircleCI!
Details
ci/circleci: test_jest_pf4 Your tests passed on CircleCI!
Details
ci/circleci: upload_docs Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.