Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

Hide no subtracks #102

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yorickreum
Copy link

See subject, don't show expansion button / + button when there are no subtracks.

@atkinchris
Copy link
Collaborator

As @willbamford has mentioned on #103 (comment)

I'm not sure you can rely on this as tracks can be dynamically loaded i.e. only loaded in when you hit toggleOpen (could be wrong - been a while since I looked at this code)

A track's isOpen status is passed into the component (and not held in an internal state), along with a callback that is triggered when the track's expand button is pressed. Using this callback, implementations could asynchronously load track data in response to a track being expanded.

We could introduce some flag into the API to note that a track "can be expanded" or "might be loaded later", that gives more information to the component to let it know that a track should present an expand button.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants