Skip to content

Commit

Permalink
add method
Browse files Browse the repository at this point in the history
  • Loading branch information
dododedodonl committed Jan 29, 2025
1 parent ae86b8c commit 5a803be
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ protected function getTablePage(): string
throw new Exception('You must define a `getTablePage()` method on your widget that returns the name of a Livewire component.');
}

protected function getTablePageMountParameters(): array
{
return [];
}

protected function getTablePageInstance(): HasTable
{
if (isset($this->tablePage)) {
Expand All @@ -68,7 +73,7 @@ protected function getTablePageInstance(): HasTable

/** @var HasTable $tableComponent */
$page = app('livewire')->new($this->getTablePage());
trigger('mount', $page, [], null, null);
trigger('mount', $page, $this->getTablePageMountParameters(), null, null);

$page->activeTab = $this->activeTab;
$page->paginators = $this->paginators;
Expand Down

0 comments on commit 5a803be

Please sign in to comment.