Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR #1659 breaks pagination, throws error if its set to all records #2058

Open
TKrisee opened this issue Jan 7, 2025 · 1 comment
Open

PR #1659 breaks pagination, throws error if its set to all records #2058

TKrisee opened this issue Jan 7, 2025 · 1 comment
Labels
bug Something isn't working unconfirmed

Comments

@TKrisee
Copy link

TKrisee commented Jan 7, 2025

  • Lunar version: 1.x
  • Laravel Version: 11.0.x
  • PHP Version: 8.3.15
  • Database Driver & Version: -

Expected Behaviour:

The page lists all available records

Actual Behaviour:

Throws the following error

"Unsupported operand types: string * int (View: /var/task/vendor/filament/tables/resources/views/index.blade.php) (View: /var/task/vendor/filament/tables/resources/views/index.blade.php)"

Steps To Reproduce:

Open a list screen, set pagination to all

Fix:

...
    protected function getDefaultPaginationQuery(Builder $query): Paginator|CursorPaginator
    {
        // This should be changed
        return $query->paginate($this->getTableRecordsPerPage());
        
        // to this
        return parent::paginateTableQuery($query);
    }
...
@TKrisee TKrisee added bug Something isn't working unconfirmed labels Jan 7, 2025
@alecritson
Copy link
Collaborator

Thanks for the report @TKrisee If you're happy to submit a PR it would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
None yet
Development

No branches or pull requests

2 participants