2amigos / yii2-grid-view-library

Highly enhanced GridView widget and grid components for Yii2
https://2amigos.us
Other
57 stars 16 forks source link

Add ability to unmerge empty value for columns. #24

Closed githubjeka closed 7 years ago

githubjeka commented 8 years ago

By default empty value in column is merged. In some cases this inconvenience.

image

To fix it:

<?= GroupGridView::widget(
            [
                'type' => GroupGridView::MERGE_NESTED,
                'doNotMergeEmptyValue' => true,          
                'mergeColumns' => ['mapFile', 'operatorID', 'operator', 'converter', 'portID'],

image

You can exclude a column from this rule via $mergeEmptyColumns:

<?= GroupGridView::widget(
            [
                'type' => GroupGridView::MERGE_NESTED,
                'doNotMergeEmptyValue' => true,
                'mergeEmptyColumns' => ['mapFile'],
                'mergeColumns' => ['mapFile', 'operatorID', 'operator', 'converter', 'portID'],

image

tonydspaniard commented 7 years ago

Thanks @githubjeka really sorry for late response