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(SelectableTile): sync selected prop and state #8279

Merged

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Apr 1, 2021

Closes #7759

This PR keeps the selectable tile's selected state in sync to prevent unexpected selection behavior

Changelog

Changed

  • deprecate handleClick and handleKeyDown props in favor of standard onClick and onKeyDown props
  • accept value from selected prop when provided

Testing / Reviewing

ensure the existing tile use cases work as expected together with the added temp example

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2021

DCO Assistant Lite bot All contributors have signed the DCO.

@netlify
Copy link

netlify bot commented Apr 1, 2021

Deploy preview for carbon-elements failed.

Built with commit df08693

https://app.netlify.com/sites/carbon-elements/deploys/607482304635de0aeff577aa

@netlify
Copy link

netlify bot commented Apr 1, 2021

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit df08693

https://deploy-preview-8279--carbon-components-react.netlify.app

@emyarod emyarod force-pushed the 7759-selectabletile-controlled-mode branch from 944e37e to 11bd374 Compare April 5, 2021 15:37
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing and temp stories look good 👍

@emyarod emyarod force-pushed the 7759-selectabletile-controlled-mode branch from 727b379 to 479fb55 Compare April 12, 2021 15:59
@kodiakhq kodiakhq bot merged commit 8ba9ce4 into carbon-design-system:main Apr 12, 2021
@emyarod emyarod deleted the 7759-selectabletile-controlled-mode branch April 12, 2021 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SelectableTile] Selected state is out of sync when user do shift+click for multi-selection
4 participants