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

FlatTableRow prop "expanded" does not work if controlled #3875

Closed
tboulis opened this issue Apr 6, 2021 · 2 comments · Fixed by #3916
Closed

FlatTableRow prop "expanded" does not work if controlled #3875

tboulis opened this issue Apr 6, 2021 · 2 comments · Fixed by #3916

Comments

@tboulis
Copy link

tboulis commented Apr 6, 2021

Current behaviour

If we try to control the expanded prop of a <FlatTableRow> the component does not handle the changed expanded prop.

Expected behaviour

The component should respond to changes in the expanded prop

Reproducible example

https://codesandbox.io/s/lucid-mahavira-f5gw7?fontsize=14&hidenavigation=1&theme=dark

Suggested solution(s)

Seems like a useEffect is missing for the expanded prop (as @edleeks87 mentioned)

Your environment

Software Version(s)
carbon-react 68.9.0
carbon-factory -
react-scripts 4.0.3
React 16.14.0
Browser Chrome
npm -
Operating System MacOS
@tboulis tboulis added Bug triage Triage Required labels Apr 6, 2021
@ian-forster
Copy link
Contributor

FE-4007

@ian-forster ian-forster added On Backlog and removed triage Triage Required labels Apr 8, 2021
edleeks87 added a commit that referenced this issue Apr 21, 2021
…ally

Adds `useEffect` to ensure `expandable` `FlatTableRows` update when the value of the `expanded` prop
changes

fix #3875
carbonci pushed a commit that referenced this issue Apr 22, 2021
### [68.25.3](v68.25.2...v68.25.3) (2021-04-22)

### Bug Fixes

* **flat-table-row:** add support for controlling expanded rows externally ([721f975](721f975)), closes [#3875](#3875)
@carbonci
Copy link
Collaborator

🎉 This issue has been resolved in version 68.25.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants