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

[Tooltip] must be as child of ToggleButton #23373

Closed
FabriceSalvaire opened this issue Nov 2, 2020 · 1 comment
Closed

[Tooltip] must be as child of ToggleButton #23373

FabriceSalvaire opened this issue Nov 2, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@FabriceSalvaire
Copy link

Using @material-ui/lab": "^4.0.0-alpha.56

In the doc https://material-ui.com/components/tooltips/ there is this example

<Tooltip title="Delete">
  <IconButton aria-label="delete">
    <DeleteIcon />
  </IconButton>
</Tooltip>

But with this code, the second button is not styled as checked when we click on it

<ToggleButtonGroup>
    <ToggleButton></ToggleButton>
    <Tooltip title="">
        <ToggleButton>
            <span></span>
       </ToggleButton>
    </Tooltip>
</ToggleButtonGroup>

a workaround is to place the tooltip as a child of ToggleButton

<ToggleButtonGroup>
    <ToggleButton></ToggleButton>
    <ToggleButton>
        <Tooltip title="">
            <span></span>
        </Tooltip>
    </ToggleButton>
</ToggleButtonGroup>
@FabriceSalvaire FabriceSalvaire added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 2, 2020
@oliviertassinari oliviertassinari added duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 2, 2020
@oliviertassinari
Copy link
Member

Duplicate of #18091

@oliviertassinari oliviertassinari marked this as a duplicate of #18091 Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants