yiisoft / yii2-bootstrap4

Yii 2 Bootstrap 4 Extension
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
216 stars 106 forks source link

headerOptions in Tabs not working #177

Closed skysham closed 5 years ago

skysham commented 5 years ago

I am trying to add the class "col-6" on li. If I add class on "items", it will also add "col-6" on li tabs and content div.

I try to use "headerOptions" for add class to li, but seems this property did not working.

What steps will reproduce the problem?

Tabs::widget([
    'items' => [
        ['label' => 'Email', 'active' => true, 'content' => 'Email Address'],
        ['label' => 'Phone', 'content' => 'Mobile Phone'],
    ],
    'options' => ['class' => 'row',],
    'headerOptions' => ['class' => 'col-6',]
]);

What's expected?

<ul id="w0" class="row nav nav-tabs" role="tablist">
<li class="nav-item col-6">
<a class="nav-link active" href="#w0-tab0" data-toggle="tab" role="tab" aria-controls="w0-tab0" aria-selected="true">Email</a>
</li>
<li class="nav-item col-6">
<a class="nav-link" href="#w0-tab1" data-toggle="tab" role="tab" aria-controls="w0-tab1" aria-selected="false">Phone</a>
</li>
</ul>

What do you get instead?

<ul id="w0" class="row nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#w0-tab0" data-toggle="tab" role="tab" aria-controls="w0-tab0" aria-selected="true">Email</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#w0-tab1" data-toggle="tab" role="tab" aria-controls="w0-tab1" aria-selected="false">Phone</a>
</li>
</ul>

Additional info

Q A
Yii vesion 2.0.14
Yii Bootstrap 4 vesion 2.0.7
PHP version 7.2.18