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

Disable all tippy programmatically #117

Open
davidecampello opened this issue Jan 3, 2023 · 6 comments
Open

Disable all tippy programmatically #117

davidecampello opened this issue Jan 3, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@davidecampello
Copy link

I'm submitting a...


[x] Support request

Hi, is it possible to disable all the configured tooltips programmatically? I have an application wher I don't want to show any tippy based on some condition decided by a observable stream.

The solution for now is to calculate the required conditions (based on platform, screen size and custom user setting) and add or remove a class to the entire body that hide all .tippy-box child elements, but is there any other way supported by the library?

Thanks

@NetanelBasal
Copy link
Member

Do you have multiple tooltips that are opened at the same time?

@davidecampello
Copy link
Author

Hi! No, I don't have..

@NetanelBasal
Copy link
Member

So what's the use case?

@davidecampello
Copy link
Author

I want have tooltips only when some conditions are true. For example screen size is larger than x pixels, to target only computers and tablets and not smartphones (in our app the condition is more complex).
Instead of using isEnabled input property for each place where I use tippy directive, I wonder if exist a global way to disable all tooltips.

@NetanelBasal
Copy link
Member

Currently, no. You're welcome to create a PR

@NetanelBasal NetanelBasal added the enhancement New feature or request label Jan 9, 2023
@Tweniee
Copy link

Tweniee commented Dec 5, 2023

I want have tooltips only when some conditions are true

you can use disable and enable tooltip with run time change detect and sending run time conditions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants