/**
* Build the grid rows.
*
* @param array $data
*
* @return void
*/
protected function buildRows(array $data)
{
$this->rows = collect($data)->map(function ($val, $key) {
$row = new Row($key, $val);
$row->setKeyName($this->keyName);
$row->setPath($this->resource());
return $row;
});
if ($this->rowsCallback) {
$this->rows->map($this->rowsCallback);
}
}