Skip to content

[Bug]: <Select> uses first <SelectItem> value as tooltip instead of respecting title prop Description #20582

@nupis-RobinH

Description

@nupis-RobinH

Package

@carbon/react

Browser

Chrome

Package version

last

React version

No response

Description

When rendering a Carbon , the browser tooltip on the native element shows the value of the first instead of the selected or even the title prop passed to . Expected behavior If a initial value is set, it should be displaying the value of the selected item as tooltip. If a title prop is provided, it should be forwarded to the native element and used as the tooltip.

Actual behavior

The tooltip shows the initial option’s value (first ) rather than the intended title or initial value.

Reproduction/example

https://stackblitz.com/edit/github-vfphhms5?file=src%2FApp.tsx

Steps to reproduce

Render the component the link above.

Hover over the component.

Tooltip shows "Monday" (the first option) instead of "Tooltip test".
Tooltip shows "Monday" (the first option) instead of "Tuesday" (selected value - supposed value when removing the title)

Setting value 2 as initial value -> initial tooltip shows "Monday" instead of "Tuesday"

Suggested Severity

None

Application/PAL

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions