From fa50828dbe10ed4aa44717c6e4bfa333ca4aae60 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Tue, 23 Sep 2025 22:48:52 +0100 Subject: Added table protected properties to config wrapper components and classes --- src/TableComponent.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/TableComponent.php b/src/TableComponent.php index e50fdb3..8e84d50 100644 --- a/src/TableComponent.php +++ b/src/TableComponent.php @@ -42,6 +42,13 @@ abstract class TableComponent extends Component protected int $defaultPageSize = 10; + protected ?string $rootClass = null; + protected string $tableClass = 'table'; + + protected string $tableWrapperComponent = 'laralight-tables::wrapper'; + protected string $paginationWrapperComponent = 'laralight-tables::wrapper'; + protected string $toolbarsWrapperComponent = 'laralight-tables::wrapper'; + // Properties #[Url] public string $search = ''; @@ -251,7 +258,13 @@ abstract class TableComponent extends Component Paginator::defaultView('laralight-tables::pagination'); - return view('laralight-tables::table', compact( + return view('laralight-tables::table', [ + 'rootClass' => $this->rootClass, + 'tableClass' => $this->tableClass, + 'tableWrapperComponent' => $this->tableWrapperComponent, + 'paginationWrapperComponent' => $this->paginationWrapperComponent, + 'toolbarsWrapperComponent' => $this->toolbarsWrapperComponent, + ] + compact( 'data', 'allColumns', 'columns', 'toolbars', )); } -- cgit v1.2.3