You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 80 Tooltip elements on a page and on desktop it works fine, onToggle triggers only when hovering over and leaving the hover, but on mobile anywhere I touch on a document it triggers onToggle 80 times, which causes re-render and browser lag. From looking at the code I see that bodyTouchStart(e) triggers hideTip everytime I touch the body.
Even if loadInfo() is a function that only does console.log() or even nothing it causes performance issues. Am I doing something wrong?
Also is there possible to add a prop (or a way I could add it myself) to load the tooltip only on desktop? I don't need it for touch devices.
The text was updated successfully, but these errors were encountered:
bekju
changed the title
On mobile onToggle triggers as many times as there are tooltip-wrappers
On mobile onToggle triggers as many times as there are Tooltips
Feb 12, 2020
I have 80 Tooltip elements on a page and on desktop it works fine,
onToggle
triggers only when hovering over and leaving the hover, but on mobile anywhere I touch on a document it triggersonToggle
80 times, which causes re-render and browser lag. From looking at the code I see thatbodyTouchStart(e)
triggers hideTip everytime I touch the body.Even if
loadInfo()
is a function that only does console.log() or even nothing it causes performance issues. Am I doing something wrong?Also is there possible to add a prop (or a way I could add it myself) to load the tooltip only on desktop? I don't need it for touch devices.
The text was updated successfully, but these errors were encountered: