Skip to content
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

Feature/250 active tab by class #260

Merged
merged 2 commits into from
Jun 17, 2024
Merged

Conversation

sarah-storm
Copy link
Contributor

Initially the idea for this ticket had been to set the active tab based on the class - however this was more complicated than first thought, as the active class needs to be in two places for the tabs to work, so it's a bit fiddly for someone to use.

It would still be useful to be able to set this in markup though, so I changed to looking at data attributes in the same way the toggle does.

This PR adds some methods, tests and documentation so that you can set the activeIndex setting via a data-active-index attribute on the node/wrapper for the whole tabset.

Copy link
Contributor

@mjbp mjbp left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@sarah-storm sarah-storm merged commit 16f4024 into master Jun 17, 2024
1 check passed
@sarah-storm sarah-storm deleted the feature/250-active-tab-by-class branch June 17, 2024 07:57
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.

2 participants