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

RingProgress should not render Tooltip if no tooltip is provieded #2220

Closed
sep2 opened this issue Aug 24, 2022 · 4 comments
Closed

RingProgress should not render Tooltip if no tooltip is provieded #2220

sep2 opened this issue Aug 24, 2022 · 4 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@sep2
Copy link

sep2 commented Aug 24, 2022

What package has an issue

@mantine/core

Describe the bug

In our grid we render a large number of RingProgress components but did not provide tooltip in the sections props, however in the code there is no way to avoid the extra tooltip components being rendered, results in a bunch of (hundreds of) empty divs in the page.

<div>
<div dir="ltr">
<div class="mantine-Tooltip-tooltip mantine-1lf7an" style="z-index: 300; display: none; left: 0px;"></div>
</div>
</div>

2022-08-24_11-03

What version of @mantine/hooks page do you have in package.json?

5.2.0

If possible, please include a link to a codesandbox with the reproduced problem

No response

Do you know how to fix the issue

No

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Possible fix

Don't render anything for tooltip if it is disabled.

@sep2
Copy link
Author

sep2 commented Aug 24, 2022

This issue maybe related and could possibly be fixed in one go.

@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Aug 27, 2022
@rtivital
Copy link
Member

Fixed in 5.2.4

nmay231 pushed a commit to nmay231/mantine that referenced this issue Aug 28, 2022
@sowizz
Copy link

sowizz commented Jan 25, 2024

@rtivital this is also a problem with the latest v6 release (6.0.21). Any idea how to prevent this?

As soon as I render 4 RingProgress I get 12 portals (btw I'd expect 8, because I have 4 RingProgress components, 2 sections each).

image

@sowizz
Copy link

sowizz commented Jan 25, 2024

Applying the same solution as in #50d4e64 seems to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

3 participants