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

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

Open
m1cm1c opened this issue Jun 5, 2024 · 0 comments
Open

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

m1cm1c opened this issue Jun 5, 2024 · 0 comments
Assignees
Labels
component: tooltip This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy status: waiting for maintainer These issues haven't been looked at yet by a maintainer

Comments

@m1cm1c
Copy link

m1cm1c commented Jun 5, 2024

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

@m1cm1c m1cm1c added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 5, 2024
@danilo-leal danilo-leal changed the title Tooltip does not work with custom sub-components [joy-ui][Tooltip] Not working with custom sub-components Jun 5, 2024
@danilo-leal danilo-leal added component: tooltip This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tooltip This is the name of the generic UI component, not the React module! package: joy-ui Specific to @mui/joy status: waiting for maintainer These issues haven't been looked at yet by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants