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]: Dropdown is still clearable when disabled #33240

Closed
2 tasks done
khoait opened this issue Nov 9, 2024 · 0 comments · Fixed by #33251
Closed
2 tasks done

[Bug]: Dropdown is still clearable when disabled #33240

khoait opened this issue Nov 9, 2024 · 0 comments · Fixed by #33251

Comments

@khoait
Copy link

khoait commented Nov 9, 2024

Component

Dropdown

Package version

9.55.1

React version

18.3.1

Environment

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  npmPackages:
    @fluentui/react-components: ^9.0.0 => 9.55.1 
    @types/react: ^17 => 17.0.83 
    @types/react-dom: ^17 => 17.0.25 
    react: ^18 => 18.3.1 
    react-dom: ^18 => 18.3.1

Current Behavior

The Dropdown component is still clearable when both clearable and disabled props are set. Not sure if this is by design.

Expected Behavior

The component should not be clearable when disabled.

Reproduction

https://stackblitz.com/edit/uhqnym?file=src%2Fexample.tsx

Steps to reproduce

  1. Red value is selected by default and disabled when the component loaded.
  2. Click the X icon.
  3. Observe that the value is cleared.

Are you reporting an Accessibility issue?

None

Suggested severity

Medium - Has workaround

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment