'problem or bug with simplepaginate livewire

I want to use simplepaginate from livewire but I have a problem.

I'll explain, I have a delete button on each row of the table, when I go to the last page with paginate I have only one row, if I click on the delete button it works normally but my table becomes empty and the message of 'no record in table is displayed' yet the database still contains data.

last page of my table

page error for me because i now i have auther data in my data base



Solution 1:[1]

You should go back to page one after each deletion.

To do so you can use the $this->resetPage(); that is added by the Livewire\WithPagination trait

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ArnaudBan