Fix "Add track" select box not going away after selecting element #4633
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)