vector-engineering / covidcg

A COVID-19 CoV Genetics (CG) browser to inform therapeutics development
https://covidcg.org
MIT License
26 stars 5 forks source link

Tooltip Fix - Rebased #423

Closed a13xk13m closed 2 years ago

a13xk13m commented 2 years ago

Fixed tooltips in the Select Sequences Modal. Two things were done: in the QuestionButton component that the user mouses over that activates the tooltip, useEffect was added. Inside of this .rebuild() is called if the prop rebuild is true (false by default). This allows us to only rebuild when they are actually viewed instead of rebuilding every tooltip when there is a mode change. It is important to note that .rebuild() needs to be called after the component has rendered, which seems backward. Secondly, the data-tip prop that is passed to ReactTooltip only works with main-tooltip right now.