-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug]: Selectable tags are not controlled. Not responding to selected prop once mounted #19228
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
Closed
2 tasks done
Labels
Comments
sojinantony01
pushed a commit
to sojinantony01/carbon
that referenced
this issue
Apr 24, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
Apr 24, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 1, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 1, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 1, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 6, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 6, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 6, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 6, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 6, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 6, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 6, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 6, 2025
sojinantony01
added a commit
to sojinantony01/carbon
that referenced
this issue
May 8, 2025
lee-chase
pushed a commit
to lee-chase/carbon
that referenced
this issue
May 9, 2025
…19228 (carbon-design-system#19231) * fix: controlled tag component for selected prop carbon-design-system#19228 * fix: fix tests for tag * fix: controlled tag component for selected prop carbon-design-system#19228 * fix: controlled tag added a default selected prop and tests carbon-design-system#19228 * fix: controlled tag added a default selected prop and tests carbon-design-system#19228 * fix: controlled tag added a default selected prop and tests carbon-design-system#19228 * fix: controlled tag fix tests carbon-design-system#19228 * fix: add profile * fix: add profile
wkeese
pushed a commit
to wkeese/carbon
that referenced
this issue
May 13, 2025
…19228 (carbon-design-system#19231) * fix: controlled tag component for selected prop carbon-design-system#19228 * fix: fix tests for tag * fix: controlled tag component for selected prop carbon-design-system#19228 * fix: controlled tag added a default selected prop and tests carbon-design-system#19228 * fix: controlled tag added a default selected prop and tests carbon-design-system#19228 * fix: controlled tag added a default selected prop and tests carbon-design-system#19228 * fix: controlled tag fix tests carbon-design-system#19228 * fix: add profile * fix: add profile
github-merge-queue bot
pushed a commit
that referenced
this issue
May 26, 2025
* fix(icons): fix icons invisible in high contrast mode If the system has a dark high-contrast theme, then icons need to be displayed in white (or a light color), and vice-versa. Otherwise, icons become invisible. Importantly, this must happen regardless of the Carbon theme setting. Fixes #17147, #18830, #19015, #19023, #19140. * fix(icons): fix tooltip story Use proper color for icon, not background color. * fix(icons): remove vestigial high-contrast-mode('icon-fill') When you use standard tokens like $icon-primary you don't need it anymore. Note: I didn't convert $support-error and $support-warning usages to a system color. Previously the inline notification icon 🚫 was converted from red to ButtonText. Also $support-error and $support-warning usages in _list-box.scss. Also, inline-notification has a dodgy use of $black-100 that I didn't change. * fix(icons): handle weird values for fill Replace $text-primary with $icon-primary as they are the same. Likewise $tab-text-disabled --> $icon-disabled. Updated _theme.scss to handle the other weird fill settings. * fix(icons): fix comment * fix(icons): fix background colors * fix(icons): fix checkmark * fix(icons): remove unused imports of high-contrast-mode * fix: remove unexpected shadow from web-component button (#19347) * fix: controlled tag component for selected prop #19228 (#19231) * fix: controlled tag component for selected prop #19228 * fix: fix tests for tag * fix: controlled tag component for selected prop #19228 * fix: controlled tag added a default selected prop and tests #19228 * fix: controlled tag added a default selected prop and tests #19228 * fix: controlled tag added a default selected prop and tests #19228 * fix: controlled tag fix tests #19228 * fix: add profile * fix: add profile * fix(date-picker): clear flatpickr instance on reset (#19239) * fix(date-picker): clear flatpickr instance on reset * fix(date-picker): clear flatpickr instance on reset * fix(date-picker): update comments and storybook docs to clarify changes * fix(date-picker): update comments and storybook docs to clarify changes * Update packages/react/src/components/DatePicker/DatePicker.tsx Co-authored-by: kennylam <[email protected]> --------- Co-authored-by: kennylam <[email protected]> * fix: modal footer buttons were not fully visible in zoom to 400 (#19288) * fix: modal footer buttons were not fully visible in zoom to 400 * fix: added test story * fix: remove test story --------- Co-authored-by: Heloise Lui <[email protected]> * fix(icons): another inverted background * chore(icons): fix merge error --------- Co-authored-by: Heloise Lui <[email protected]> Co-authored-by: Sojin antony <[email protected]> Co-authored-by: Warren Blood <[email protected]> Co-authored-by: kennylam <[email protected]> Co-authored-by: Preeti Bansal <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Package
@carbon/react
Browser
Chrome
Package version
1.81.0
React version
18
Description
Component not reading selected prop once mounted. - https://github.com/carbon-design-system/carbon/blob/main/packages/react/src/components/Tag/SelectableTag.tsx#L98
When updating the selected prop value, the component is not updating.
I have created an example - https://stackblitz.com/edit/ktw9c81w
I am trying to load several tags in a table; tags may be duplicated in every row. When selecting a tag in one row, all other row tags should behave the same.
Screen.Recording.2025-04-24.at.1.09.06.PM.mov
Reproduction/example
https://stackblitz.com/edit/ktw9c81w
Steps to reproduce
Try to update selected prop if a tag once tag is mounted in DOM
Suggested Severity
Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.
Application/PAL
Event automation
Code of Conduct
The text was updated successfully, but these errors were encountered: