This repository was archived by the owner on Jan 5, 2023. It is now read-only.
Repository navigation
Tooltips on Dropdown Menus #296
mathieu-fournier
started this conversation in
General
Replies: 1 comment 2 replies
|
Hi @mathieu-fournier 👋 Thanks for creating this discussion. The "div wrapper workflow" is actually documented in our FAQ. For your two cases,
|
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Tooltips on Dropdown Menus
For anyone wondering how to add a Tooltip on a DropdownButton or on the button to open a DropdownMenu.
Wrapping them in a div makes it work.
See pictures below for examples :


Note:
It doesn't work without the div because Tooltip and DropdownButton are function components, which cannot be used as Refs by their parents.

Also:
Is this "div wrapper" workflow common in React or is it an anti-pattern I found ?
All reactions