kartik-v / yii2-dynagrid

Turbo charge the Yii 2 GridView with personalized columns, page size, and themes.
http://demos.krajee.com/dynagrid
Other
74 stars 66 forks source link

Using dynagrid with TabsX makes some fields in dynagrid personalize grid setting collapse #169

Closed mohalaika closed 6 years ago

mohalaika commented 6 years ago

Steps to reproduce the issue

1.Create the tabs first:- $items = [ [ 'label' => 'Hold Orders', 'content' => \Yii::$app->controller->renderPartial('hold', ['dataProvider' => $activeMed]), 'active' => true, 'id' => 'tab3', ], [ 'label' => 'Pending Orders', 'content' => \Yii::$app->controller->renderPartial('pending', ['dataProvider' => $pendingMed]), 'active' => false, 'options' => ['id' => 'Tab1'] ], [ 'label' => 'Active Orders', 'content' => \Yii::$app->controller->renderPartial('grid', ['dataProvider' => $activeMed]), 'active' => false, 'id' => 'tab2',

],

]; echo the taps:- echo TabsX::widget([ 'items' => $items, 'position' => TabsX::POS_LEFT, 'id' => '', ]);

it will fill the data fine,but when press on personalize grid setting for tab2 will collapse the Grid Theme and Default Sort selection and when press on tab3 the Page Size that related to personalize grid setting for tab 3 not exists

Browsers

Operating System

Libraries

kartik-v commented 6 years ago

This has nothing to do with the extensions but the way you write your markup and logic and also you need to understand the different render methods in Yii. If you are using renderPartial - it will just render the HTML markup but will not trigger the Javascript or Jquery scripts which are needed by plugins. You may need to do this yourself if you are using such extensions - OR use methods like renderAjax instead of renderPartial.

mohalaika commented 6 years ago

Yes friend I already tried your solution but still same problem,I even made changes to Yii2 advance template example adding tabs and dynagrid (clean project) and still having same problem

mohalaika commented 6 years ago

Dear Friend, the reason of problem is the select components in dynagrid personalize grid setting have the same Id I fix the issue changing on yii2-dynagrid view config.php by adding specific id for ever select in setting connection it with dynagrid Id

kartik-v commented 6 years ago

Thanks for the update. I will try to enhance to provide an option for configuring this. Reopening this.