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?
Solution:
```php public function updatedUser() { $this->resetTable(); }...
Jump to solution
3 Replies
Booltje124
Booltje1243mo ago
Found that function. But how to catch the user change?
Solution
awcodes
awcodes3mo ago
public function updatedUser()
{
$this->resetTable();
}
public function updatedUser()
{
$this->resetTable();
}
Want results from more Discord servers?
Add your server