Ternary renders prevent tooltip from opening.
See original GitHub issue {auth.user && auth.user[0].privilege_level < 5 ? ( <Menu.Item name="Pending Tickets" data-tip="Pending Data Ops" as={Link} to="/pending-data-ops" > <Icon name="address card" /> </Menu.Item> ) : null}
The above code renders the menu item based on the user level. The Ternary wrapper stops the tooltip from rendering. This can be avoided by adding the data-tip prop to a wrapper above the ternary, maybe not a bad issue, might want to put in docs? I dunno take this info and do with it what you need lol.
This works:
<div data-tip="Pending Data Ops"> {auth.user && auth.user[0].privilege_level < 5 ? ( <Menu.Item name="Pending Tickets" as={Link} to="/pending-data-ops"> <Icon name="address card" /> </Menu.Item> ) : null} </div>
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top GitHub Comments
Hello, you have to rebuild the tooltip component with ReactTooltip.rebuild() (i did this after setState)
I did and worked for me, i can’t do your solution with my code because of the structure is a quit different. hope it will help you
Pull request welcome! Add it where you think it’s helpful and I’ll get it in.
On Fri, Oct 25, 2019 at 6:03 AM Dimitris Raptis notifications@github.com wrote: