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(Select): display selections data properly #2848

Merged
merged 2 commits into from Sep 18, 2019

Conversation

@SpyTec
Copy link
Contributor

SpyTec commented Sep 5, 2019

What: This fixes selections prop being properly displayed if updated externally.

Additional issues: Fixes #2828

@SpyTec SpyTec changed the title fix(Select): display selections properly fix(Select): display selections data properly Sep 5, 2019
@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Sep 5, 2019

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

@redallen redallen requested a review from kmcfaul Sep 6, 2019
Copy link
Contributor

redallen left a comment

Just change an if statement and this looks good. Asking @kmcfaul for a review since she's familiar with TypeAhead,

@@ -120,6 +120,12 @@ export class Select extends React.Component<SelectProps, SelectState> {
typeaheadFilteredChildren: React.Children.toArray(this.props.children)
});
}

if (prevProps.selections !== this.props.selections) {

This comment has been minimized.

Copy link
@redallen

redallen Sep 6, 2019

Contributor

Change to if (prevProps.selections !== this.props.selections && this.state.typeaheadActiveChild) {


if (prevProps.selections !== this.props.selections) {
this.setState({
typeaheadInputValue: (this.state.typeaheadActiveChild && this.state.typeaheadActiveChild.innerText)

This comment has been minimized.

Copy link
@redallen

redallen Sep 6, 2019

Contributor

Change to typeaheadInputValue: this.state.typeaheadActiveChild.innerText.

@SpyTec

This comment has been minimized.

Copy link
Contributor Author

SpyTec commented Sep 9, 2019

Thanks @redallen, moved check in the latest commit :)

Copy link
Contributor

kmcfaul left a comment

Looks good

Copy link
Contributor

redallen left a comment

Thanks as always @SpyTec . T-Shirt coming soon :)

@redallen redallen merged commit 5dc05eb into patternfly:master Sep 18, 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
@SpyTec SpyTec deleted the SpyTec:fix/select-2828 branch Sep 24, 2019
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.