Skip to content

Commit

Permalink
Save pagination preference per entity rather than for entire model
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangums authored Oct 23, 2024
1 parent 9b4377b commit c3f6496
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/tables/src/Concerns/CanPaginateRecords.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ public function getTablePaginationPageName(): string
public function getTablePerPageSessionKey(): string
{
$table = class_basename($this::class);
$id = method_exists($this, 'getOwnerRecord') ? $this->getOwnerRecord()->id : '';

return "tables.{$table}_per_page";
return "tables.{$table}_per_page.{$id}";
}

/**
Expand Down

0 comments on commit c3f6496

Please sign in to comment.