summaryrefslogtreecommitdiff
path: root/src/TableComponent.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/TableComponent.php')
-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',
));
}