Skip to content

[tooltip] Using Tooltip.Trigger's render prop with a forwardRef component doesn't trigger the tooltip #2185

Open
@iansjk

Description

@iansjk

Bug report

For <Tooltip.Trigger render={...}> I would expect to be able to use a component for the render prop, but it seems that this doesn't work.

The specific case I observed was for <label>.

Current behavior

  • Using <Tooltip.Trigger render={<label>...</label>}> triggers the tooltip
  • Using <Tooltip.Trigger render={SomeOtherComponent}> (where SomeOtherComponent forwards a label ref) doesn't trigger the tooltip

Expected behavior

Both methods trigger the tooltip

Reproducible example

https://codesandbox.io/p/sandbox/3h6f7t

Base UI version

v1.0.0-beta.0

Which browser are you using?

Chromium

Which OS are you using?

Mac OS

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions