Reset table pagination after reactive property changes
I have a Reactive User property that I use in a table query to fetch Quotes. When I click on page 11 for one user, then switch to another user who only has 6 pages, the table is stuck on page 11, showing an empty page.
#[Reactive]
public User $user;
>query(Quote::query()->where([
['user_id', '=', $this->user->id],
['status', '!=', QuoteStatus::Open],
])
How can i fix this issue?
3 Replies
maybe reseting the table when you change the user?
https://filamentphp.com/docs/3.x/tables/advanced#resetting-the-table
Found that function. But how to catch the user change?
Solution