Projects
github.com/youra-h


Data table

PHP

use yh\mdc\components\DataTable;
 
echo DataTable::one([
    'isAjaxRequest' => Yii::$app->request->isAjax
])
    ->setId('user-list')
    ->setGridView([
        'dataProvider' => $dataProvider,        
        'columns' => [
            [
                'class' => '\yh\mdc\widget\grid\SerialColumn',
            ],
            [
                'class' => '\yh\mdc\widget\grid\CheckboxColumn',
            ],
            [
                'attribute' => 'id',
            ],
            'email:email',
        ],
    ])->render();

JavaScript

app.controls.add('user-list-rows', 'select', []);
app.controls.add('user-list', 'dataTable', []);
app.controls.addObject(app.utils.DataTableProcessing('user-list'));

Samples