Possibility and best approach to define page names when there are several tables on one page #1233
Replies: 3 comments 3 replies
-
Does anyone have any ideas? |
Beta Was this translation helpful? Give feedback.
0 replies
-
#[Url(as: 'page', keep: true)]
public string|int $page = 1;
public function updatedPaginators($value): void
{
$this->page = $value;
}
public function hydratePage(): void
{
$this->paginators['page'] = $this->page;
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
lsmedia
-
[Update] @luanfreitasdev has created a great enhancement for Powergrid, which solves this problem very elegantly in version 5.x.
See the documentation: https://livewire-powergrid.com/table/features-setup.html#custom-pagename-in-url |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to assign a 'page name' to the paginator of a table so that pagination works correctly on multiple tables per page?
By default, all tables use the page name 'page', which sometimes leads to unwanted behavior when the whole page is reloaded (due to the ambiguous GET parameter
?page=XYZ
).In the source code I have seen that all parts (especially the pagination view) work entirely without the additional optional parameter
$pageName
. But is there a clean solution to make this work without big changes to the package?Beta Was this translation helpful? Give feedback.
All reactions