-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat($theme-default): add initial open group index option #2408
feat($theme-default): add initial open group index option #2408
Conversation
Is this a change that's wanted? If so, what can I provide to get it towards integration? |
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.
Could you help update the docs?
Adds an optional property for sidebar groups, so that one can initially display a group other than the first as open. Also allows to initially display all groups as closed, by setting `initialOpenGroupIndex` to `-1`.
@ulivz Of course. I've added a bit more info and rebased the branch. Let me know if there is more to do. |
@ulivz ok like this? |
Don‘t want to be pushy with this, but we could use this and I don‘t want it to drown. Let me know if further improvements are needed. |
@bencodezen @billyyyyy3320 @kefranabg any chance to get this merged? |
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.
Looks great. Thanks for the work on this @dennisreimann!
Awesome, thanks for merging 🚀 |
When i am looking for some solution to change the open index from the source code, and it just commited yesterday! What a coincidence! |
How about using global config such as "themeConfig.defaultOpen" to control the collapse status of sidebar items, because the "initialOpenGroupIndex" does not work in "Sidebar.vue" file |
* feat($theme-default): add initial open group index option Adds an optional property for sidebar groups, so that one can initially display a group other than the first as open. Also allows to initially display all groups as closed, by setting `initialOpenGroupIndex` to `-1`. * docs: add details on `initialOpenGroupIndex`
Summary
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
You have tested in the following browsers: (Providing a detailed version will be better.)
If adding a new feature, the PR's description includes:
Adds an optional property for sidebar groups, so that one can initially display a group other than the first as open. Also allows to initially display all groups as closed, by setting
initialOpenGroupIndex
to-1
.