Skip to content

[Bug]: Card Component - selected={false] not being honored after user click a card #29202

Description

@tedishero

Library

React Components / v9 (@fluentui/react-components)

System Info

Website

Are you reporting Accessibility issue?

None

Reproduction

https://codesandbox.io/s/sad-lovelace-6w9sx5?file=/example.tsx:2932-2937

Bug Description

Actual Behavior

Sandbox repro: https://codesandbox.io/s/sad-lovelace-6w9sx5?file=/example.tsx:2932-2937
In the example I am setting selected={false} but after user clicks a card, the card still shows selected state visually even though I am passing false.

Expected Behavior

I am expecting the visual state to follow what I am setting selected prop to.

Logs

No response

Requested priority

Blocking

Products/sites affected

No response

Are you willing to submit a PR to fix?

yes

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions