GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
209 stars 62 forks source link

Fix "Add track" select box not going away after selecting element #4633

Closed cmdcolin closed 2 weeks ago

cmdcolin commented 2 weeks ago

We have the concept of different types of track selectors. Currently, the select box is not dismissed properly though

This was a bit of a tricky one but it was due to not having a Suspense boundary properly wrapping the component.

Diagnosed by removing the rendering of <Component/>...confirmed that the behavior went away, realized it was related to rendering the <Component/> and that there could be a suspense boundary needed (could be interesting to dive deeper into this behavior for hobby purposes, probably it was going to a suspense boundary higher in the react tree and then the select state was sort of messed up by that somehow)

cmdcolin commented 2 weeks ago

video recording of bug, showing that the popup stays active even after i select an item

https://github.com/user-attachments/assets/76eefcf9-cfc4-4a1c-8c94-88f0aa7effc0