fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Bug]: Dropdown option is not selected when option value is empty string or 0

Open ymyqwe opened this issue 1 year ago • 1 comments

Library

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

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (20) x64 Intel(R) Core(TM) i9-10900X CPU @ 3.70GHz
    Memory: 43.69 GB / 47.05 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh

Are you reporting Accessibility issue?

None

Reproduction

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

Bug Description

Actual Behavior

When Option Value is empty string or zero. The option is not selected with checkIcon.

image

Expected Behavior

Option should be selected with checkIcon image

Logs

No response

Requested priority

High

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

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

ymyqwe avatar Apr 02 '24 04:04 ymyqwe

This is probably because of the !!optionValue here.

spmonahan avatar Apr 02 '24 21:04 spmonahan