-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: Add initialActive option parameter #9141
UI: Add initialActive option parameter #9141
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/storybook/monorepo/ge573viyc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make constants for this, something like this:
export const ACTIVE = {
SIDEBAR: 0,
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make constants for this, something like this:
export const ACTIVE = {
SIDEBAR: 0,
...
}
fdca79a
to
50fc83c
Compare
Thanks for the review 👍 You are right, we should use constants. I pushed the update @shilman |
Hello @shilman , do you have any updates on this ? 🙏 |
@alexandre-lelain yeah we're basically in feature freeze while we ship 5.3, which is in RC now and scheduled to ship in the first two weeks of january |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about making these strings? Strings are self-documenting. Consider:
initialActive: 'sidebar'
vs
initialActive: 0
Yup you got a point 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💥 thanks!!
+1 for this feature. I was looking for a way to set the default tab when storybook first loads... Right now, it always loads |
Issue: #9127
What I did
initialActive
option parameter to storybook-ui config.Options Parameters
doc page.Users can now set the default active tab on Mobile.
How to test
To test this feature, simply set
initialActive
in the options of the storybook config, and check that the default active tab on Mobile matches your setup: