materialize icon indicating copy to clipboard operation
materialize copied to clipboard

Tabs not working correcly in collapsible structure

Open srocerer opened this issue 11 years ago • 3 comments

Cant get active tab botom border in collapsible structure. Please check second collapsible tab:

http://jsfiddle.net/kasaras/tdz6uraL/1/

srocerer avatar Aug 02 '15 10:08 srocerer

you are using the same ids to these tabs. will work like a charm if you change them. for example

first tab

  <div class="row">
    <div class="col s12">
      <ul class="tabs">
        <li class="tab"><a href="#test1">Test 1</a></li>
        <li class="tab"><a class="active" href="#test2">Test 2</a></li>
      </ul>
    </div>
    <div id="test1" class="col s12">Test 1</div>
    <div id="test2" class="col s12">Test 2</div>
  </div>

second tab

  <div class="row">
    <div class="col s12">
      <ul class="tabs">
        <li class="tab"><a href="#test3">Test 1</a></li>
        <li class="tab"><a class="active" href="#test4">Test 2</a></li>
      </ul>
    </div>
    <div id="test3" class="col s12">Test 1</div>
    <div id="test4" class="col s12">Test 2</div>
  </div>

axdemelas avatar Aug 02 '15 21:08 axdemelas

As @ahlechandre has indicated, you need to give them unique identifiers: http://codepen.io/anon/pen/XbGqgQ

carlosperate avatar Aug 10 '15 17:08 carlosperate

Hi, I got a simple Tabs component in a simple Collapsible component and I got the same issue. I look previous answers but I got unique identifiers.

https://jsfiddle.net/6axccg75/ --> first tab is marqued active but he hasn't bottom border

https://jsfiddle.net/70qms28o/ --> forcing with select_tab : both tab got the bottom border

Any ideas ?

constantin-v avatar Feb 08 '17 10:02 constantin-v