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

[Chips] foundation.getSelectedChipIds() is updated before calling this.props.handleSelect() #644

Closed
moog16 opened this issue Jan 29, 2019 · 0 comments

Comments

@moog16
Copy link
Contributor

moog16 commented Jan 29, 2019

  • ChipSet.adapter.setSelected method calls setState({selectedChipIds: foundation.getSelectedChipIds})

    • the issue with foundation.getSelectedChipIds is that it alters the selectedChipIds array by push'ing
    • since it doesn't move through state, the screenshot test component's state.selectedChipIds is updated before componentDidUpdate is called.
  • temporary fix is to copy foundation.getSelectedChipIds() before calling props.handleSelect() in adapter.setSelected

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

No branches or pull requests

1 participant