You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .nav-item to li
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.
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 js- to the name.
Finally I think we should be more flexible with our components because personnaly I prefer a flexible framework than a rigid framework.
So we should allow Tab JS to work with all lists provide by Bootstrap
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.
Activity
agavazov commentedon Sep 3, 2016
You can see the same problem with this example http://www.codeply.com/go/rv3Cvr0lZ4
mdo commentedon Oct 27, 2016
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?
Johann-S commentedon Oct 28, 2016
It's because of this line : https://github.com/twbs/bootstrap/blob/v4-dev/js/src/tab.js#L50IMO If we change this selector to accept.list-group-itemit will work fineYou can make it works like this, add
.nav-itemtoli:Is it ok for you @mdo my solution ?
mdo commentedon Oct 28, 2016
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?
Johann-S commentedon Oct 30, 2016
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 😞
giulianovelli commentedon Dec 9, 2016
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
js-to the name.Johann-S commentedon Dec 30, 2016
Finally I think we should be more flexible with our components because personnaly I prefer a flexible framework than a rigid framework.
So we should allow Tab JS to work with all lists provide by Bootstrap
mdo commentedon Dec 31, 2016
I agree with that @Johann-S! Any ideas?
Johann-S commentedon Dec 31, 2016
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.
mdo commentedon Mar 18, 2017
Fixed by #21756.