Settings

Changing base HTML elements

Set custom class on grid wrapper

/** @var Mesour\Components\Html $wrapper */
$wrapper = $grid->getWrapperPrototype();

$wrapper->class('my-class');

//! TRUE = append
$wrapper->class('my-next-class', TRUE);

Filter prototype

/** @var Mesour\Components\Html $wrapper */
$filterWrapper = $grid->getFilterPrototype();

Pager prototype

/** @var Mesour\Components\Html $wrapper */
$pagerWrapper = $grid->getPagerPrototype();

Defaults for Mesour\UI\DataGrid

protected $defaults = [
    self::WRAPPER => [
        'el' => 'div',
        'attributes' => [
            'class' => 'mesour-datagrid'
        ],
    ],
    self::PAGER_WRAPPER => [
        'el' => 'div',
        'attributes' => [
            'class' => 'mesour-datagrid-pager'
        ],
    ],
    self::FILTER_WRAPPER => [
        'el' => 'div',
        'attributes' => [
            'class' => 'mesour-datagrid-filter'
        ],
    ]
];