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

fix(ClipboardCopy): Update if children change #2849

Merged

Conversation

@SpyTec
Copy link
Contributor

SpyTec commented Sep 5, 2019

What: This updates ClipboardCopy to update component if children changes

Additional issues: fixes #2846

@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Sep 5, 2019

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

@@ -91,6 +91,12 @@ export class ClipboardCopy extends React.Component<ClipboardCopyProps, Clipboard
toggleAriaLabel: 'Show content'
};

componentDidUpdate = (prevProps: ClipboardCopyProps, prevState: ClipboardCopyState) => {
if (prevProps.children !== this.props.children) {

This comment has been minimized.

Copy link
@redallen

redallen Sep 6, 2019

Contributor

This check will work because we technically only support children being a string (despite it's type being ReactNode).

@redallen redallen merged commit b5252f6 into patternfly:master Sep 6, 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
@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Sep 6, 2019

Your changes have been released in:

  • @patternfly/react-core@3.99.4
  • @patternfly/react-docs@4.11.7
  • @patternfly/react-inline-edit-extension@2.11.25
  • demo-app-ts@2.22.4
  • @patternfly/react-table@2.20.5
  • @patternfly/react-topology@2.8.24
  • @patternfly/react-virtualized-extension@1.2.13

Thanks for your contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.