Skip to content

Commit

Permalink
Allow to set unescaped/raw columns in datatable presenter.
Browse files Browse the repository at this point in the history
  • Loading branch information
NViktors committed Dec 20, 2017
1 parent 3948ef8 commit bacb5d0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Traits/AdminUsersPagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ public function paginate()
return view($actionsTd ?? 'user::users.tds.actions', compact('row', 'config'))->render();
});

// Don't escape action column as it contains HTML code.
$datatable->rawColumns([
// Set columns that shouldn't be escaped.
$rawColumns = (array)property_exists($presenter, 'rawColumns') ? $presenter->rawColumns : [];

$datatable->rawColumns(array_merge([
'action',
]);
], $rawColumns));

return $datatable->make(true);
}
Expand Down

0 comments on commit bacb5d0

Please sign in to comment.