mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.83k stars 32.25k forks source link

[joy-ui][Tooltip] Not working with custom sub-components #42536

Open m1cm1c opened 5 months ago

m1cm1c commented 5 months ago

Steps to reproduce

import {Tooltip} from '@mui/joy';

export function TooltipBug() {
  return <>
    <Tooltip title="foo">
      <div>f</div>
    </Tooltip>
    <Tooltip title="bar">
      <CustomComponent />
    </Tooltip>
  </>;
}

function CustomComponent() {
  return <div>b</div>;
}

shows "foo" but does not show "bar".

Current behavior

Yields:

<div aria-label="foo" class="">f</div>
<div>b</div>

Expected behavior

<div aria-label="foo" class="">f</div>
<div aria-label="bar" class="">b</div>

Context

i want to use components

Your environment

Browser: Mozilla Firefox 126.0.1

npx @mui/envinfo ``` System: OS: Linux 5.19 Manjaro Linux Binaries: Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm pnpm: Not Found Browsers: Chrome: Not Found ```

Search keywords: tooltip

siriwatknp commented 2 months ago

Thanks for reporting the issue! Joy UI development is temporarily on hold as the maintainers focus on the next two major releases of Material UI