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

Tooltips triggerType "manual" #181

Closed
danielxbauer opened this issue Jun 29, 2022 · 3 comments
Closed

Tooltips triggerType "manual" #181

danielxbauer opened this issue Jun 29, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request v1.6.3 Issues and tasks for v1.6.3 release

Comments

@danielxbauer
Copy link

Is your feature request related to a problem? Please describe.
I would like to show a tooltip only when I explicitly call the show/hide method in the Tooltip instance.
Currently there are two triggerTypes: hover and click. If none of those two is set the default is hover.
There is no option (as far as I know) to stop the auto showing/hiding on certain events.

Describe the solution you'd like
A third triggerType option called manual or none.
The default behavior would be that the tooltip is only displayed when you call it programmatically using the show method.

Describe alternatives you've considered
I could create my own Tooltip/Wrapper class where I could implement it in the desired way.

Additional context
https://flowbite.com/docs/components/tooltips/#methods

@danielxbauer
Copy link
Author

Possible code change to make it possible:

tooltip.js > _getTriggerEvents method

case 'none':
  return {
    showEvents: [],
    hideEvents: []
  }

@zoltanszogyenyi zoltanszogyenyi added the enhancement New feature or request label Jul 6, 2022
@zoltanszogyenyi zoltanszogyenyi self-assigned this Jul 6, 2022
@zoltanszogyenyi
Copy link
Member

This is a good idea that we could use for other components as well (ie. popovers). Will find a solution for v1.6.0.

@zoltanszogyenyi zoltanszogyenyi added the v1.6.3 Issues and tasks for v1.6.3 release label Dec 7, 2022
@zoltanszogyenyi
Copy link
Member

Hey @danielxbauer,

I've introduced the none option via this commit (2689df5) and this will be released as of v1.6.3.

Cheers,
Zoltan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.6.3 Issues and tasks for v1.6.3 release
Projects
Development

No branches or pull requests

2 participants