Data from previous pagination link lost after navigate to another page.
I am using laravel lengthawarepaginator. I have a checkboxes with it. When i click a button to select all the check boxes it only check for the first page, and when navigate to another pages then the data from previous page will lost.
You will have to store the data of which boxes are checked separately from just the checkboxes themselves.
You can store a list of the checked boxes in an array before loading a new page. After a page loads and the checkboxes are rendered you will have to check any checkboxes that were previously stored.
In general using the DOM to keep track of data like this can get messy and difficult to work with. I recommend taking a look at the vue related videos on this site as functionality is much faster to create and easier to understand than the very DOM-centric jQuery style approach.