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

[Bug]: Selectable Tile: component ignores the selected prop #16976

Closed
2 tasks done
shocquu opened this issue Jul 17, 2024 · 1 comment
Closed
2 tasks done

[Bug]: Selectable Tile: component ignores the selected prop #16976

shocquu opened this issue Jul 17, 2024 · 1 comment

Comments

@shocquu
Copy link

shocquu commented Jul 17, 2024

Package

@carbon/react

Browser

Chrome, Safari, Firefox, Edge

Package version

1.61.0

React version

18.0.0

Description

The internal selected state (responsible for showing the checkbox) does not reflect the selected value.

Screen.Recording.July.14.mov

Reproduction/example

https://stackblitz.com/edit/github-s5u4wl-2gkk4d?file=src%2FApp.jsx

Steps to reproduce

  1. Import the SelectableTile component
  2. Set the value of the selected prop to true
  3. Click on the tile.

Suggested Severity

None

Application/PAL

No response

Code of Conduct

@2nikhiltom
Copy link
Contributor

Hey @shocquu
The selected prop is intended to maintain the checked state of a tile when the component first renders. It doesn't enforce a read-only or unavailable state, so a tile with the selected prop can still be deselected or unchecked based on user interaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants