summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Light <samlight1994@gmail.com>2025-09-23 22:48:52 +0100
committerSam Light <samlight1994@gmail.com>2025-09-23 22:48:52 +0100
commitfa50828dbe10ed4aa44717c6e4bfa333ca4aae60 (patch)
treed1b6a6244334ccc1346b22e0f91dd0e7c35e4fa6 /src
parentc28779dcb765e53e38d1fff4f0deaf2908fdc357 (diff)
Added table protected properties to config wrapper components and classes
Diffstat (limited to 'src')
-rw-r--r--src/TableComponent.php15
1 files changed, 14 insertions, 1 deletions
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',
));
}