Maintain Bootstrap tab on Yii2 GridView page changing
<p>I have a page that has 5 bootstrap tabs. When I change pager on any tab, moves to the first tab occurs.
How to activate the tab which was to change the pager.</p>

<p>Entire page gets 5 dataProviders. Each like </p>

<pre><code>$overallProvider = new ArrayDataProvider([
        'allModels' =&gt; $overallArray,
        'pagination' =&gt; [
            'pageSize' =&gt; 100,
            'pageParam' =&gt; 'overall-page',
            'params' =&gt; array_merge($_GET, ['#' =&gt; 'overall']),
        ],
        'sort' =&gt; [
            'attributes' =&gt; ['rep'],
            'defaultOrder' =&gt; ['rep' =&gt; SORT_DESC],
            'sortParam' =&gt; 'overall-sort',
        ],
    ]);
</code></pre>

<p>In a view file created bootstrap tabs</p>

<pre><code>&lt;ul class="nav nav-tabs" id="myTabs"&gt;
    &lt;li class="active"&gt;&lt;a href="#overall" data-toggle="tab"&gt;Overall&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#circuit" data-toggle="tab"&gt;Circuit&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#sprint" data-toggle="tab"&gt;Sprint&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#drift" data-toggle="tab"&gt;Drag&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#drag" data-toggle="tab"&gt;Drift&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>and each GridView widget looks like</p>

<pre><code>&lt;?= GridView::widget([
            'dataProvider' =&gt; $overall,
            'layout' =&gt; "&lt;div class='text-right'&gt;{summary}&lt;/div&gt;\n{items}\n&lt;div class='text-center'&gt;{pager}&lt;/div&gt;",
            'pager' =&gt; [
                'options'=&gt;['class'=&gt;'pagination pagination-sm'],
                'hideOnSinglePage'=&gt;true,
                'lastPageLabel'=&gt;'&gt;&gt;',
                'firstPageLabel'=&gt;'&lt;&lt;',
            ],
            'columns' =&gt; [
                ['class' =&gt; 'yii\grid\SerialColumn'],
                'username',
                'rep:decimal',
                'wins:decimal',
                'loses:decimal',
                'disc:decimal',
                'avg_opp_rating:decimal',
                'avg_opp_rep:decimal'
            ],
        ]) ?&gt;
</code></pre>