Skip to content

fix: view-switcher > add docs + demos#6640

Open
GZolla wants to merge 2 commits intomainfrom
gzolla/view-switcher-docs
Open

fix: view-switcher > add docs + demos#6640
GZolla wants to merge 2 commits intomainfrom
gzolla/view-switcher-docs

Conversation

@GZolla
Copy link
Contributor

@GZolla GZolla commented Feb 28, 2026

GAUD-9538

Adding a README and improving the demos for d2l-view-switcher

@GZolla GZolla requested a review from a team as a code owner February 28, 2026 02:42
if (!items.find(i => i.selected)) items[0].selected = true;
const selectedItems = items.filter(i => i.selected);
if (selectedItems.length === 0) items[0].selected = true;
if (selectedItems.length > 1) { // unselect all but the first selected item
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added so the d2l-view-switcher-button demo would work properly on the component page

@github-actions
Copy link
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-6640/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant