-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
v4 list-group not work correctly with tabs #20620
Comments
You can see the same problem with this example http://www.codeply.com/go/rv3Cvr0lZ4 |
Yeah, right now our tab JS only works with navigation components I think, not the list group. Unsure how complicated it'd be to add support for that, but maybe our newest JS friends @Johann-S and @bardiharborow could give us an idea of if it's doable? |
You can make it works like this, add <ul class="list-group">
<li class="list-group-item nav-item">
<a class="nav-link active" data-toggle="tab" href="#homeJo" role="tab">Home</a>
</li>
<li class="list-group-item nav-item">
<a class="nav-link" data-toggle="tab" href="#profileJo" role="tab">Profile</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="homeJo" role="tabpanel">Home</div>
<div class="tab-pane" id="profileJo" role="tabpanel">Profile</div>
</div> Is it ok for you @mdo my solution ? |
Hmmm, maybe. We could also update that line of JS to accept multiple selectors, right? I could go either way tbh. If we do the multiple selectors for our JS elsewhere, then I'd say let's do that. But if we encourage mixing/matching of classes across different components, than let's do that. Thoughts? |
It's a tough choice, FYI I didn't find any multiple selectors in our JS currently and tbh it's difficult to know which solution is the better one 😞 |
Maybe having specific selectors for behavior as opposed to styles could be a more generic and elegant solution? This way they could be applied to any element and it wouldn't seem weird. Someone differentiate these selectors adding a prefix like |
Finally I think we should be more flexible with our components because personnaly I prefer a flexible framework than a rigid framework. |
I agree with that @Johann-S! Any ideas? |
It's wrong what I said previously we already have multi selectors in our JS in Tab JS. So we have to expand this selector to accept all lists provided by Bootstrap. |
Fixed by #21756. |
On V3 when I make tabs with list-group it works fine, but in V4 tabs are open once and active class does not disappear.
This example is with V3, you can see whats happen when test it with V4
The text was updated successfully, but these errors were encountered: