Skip to content

Missing table items on globally scoped models when sorting by created_at #15865

Open
@alexandru-eftimie

Description

@alexandru-eftimie

Package

filament/filament

Package Version

v3.3.4

Laravel Version

v12.2.0 also v11.44.2

Livewire Version

v3.6.2

PHP Version

8.2.26

Problem description

  1. Globally Scope a model.
  2. Make sure there are at least 5 entries on the same date.
  3. Make sure to page by 5 or ten ( larger pages seem to work )
  4. Sort table by created_at.
  5. Some items are missing from filament tables.

Expected behavior

All items should appear eventually.

running regular laravel paginators. I.e.:

$x = \App\Models\Customer::paginate(perPage:10, page: 3)->items()

In tinker works as expected

Steps to reproduce

Just migrate and seed the example repo.

If you set if ($cnt > 5) { in database/factories/CustomerFactory.php:26
Then id 41 is always missing when sorting by created_at.
If you set if ($cnt > 15) { then then 63 is missing.

Reproduction repository (issue will be closed if this is not valid)

https://github.com/helios-live/filament-paging-bug

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions