❔ How to store JS selection data after page refresh
Hello I hope someone can take a look at that, I'm still stuck at that problem
https://stackoverflow.com/questions/77367216/how-to-store-js-selection-data-after-page-refresh
Stack Overflow
How to store JS selection data after page refresh
I am trying to create an ecommerce page. I want to make category selections with using checkboxes. It can make the filtering and give me the necessary data; the backend works. But when I change the...
11 Replies
local storage
I already used local storage, you can check the provided answer in the post. But not working fine with pagination
What's not working about it?
Check the answer, about using local storage
"It is kind of working, but not fully. If I move to another page with pagination, it does not put the data for that page. The initial data is constantly displayed on other pages. Always the first six data are displayed for each page. I can't see the rest of the data. Before the local storage, it was working without problems. It pops up the rest of the data without the filtering than displays the filtered first six data again. I couldn't fix the problem"
Always the first six data are displayed for each page.Why is this?
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.I am the one who asked man 😄
and now I'm asking you
you expect me to know?
you wrote the code, and haven't shown any of it
What do you want me to show? Everything is written in the post in a detailed way, I already explained.
If I need to give an example to make sure you understand better. You have 10 item in your data, you display 6 for each, when you change to page two you need to see the rest of 4 data. My problem occures here, I don't see the rest 4 data. I see the first 6 again in everypage. I see the rest 4 data(for a sec) , then I see the first 6 data immidiatly. But I already explained these in the post
none of the code you put in that post includes you using local storage
based on this, I would have to recommend that you get rid of the code that is causing the first 6 results to be included within every page, or modify it in such a way that it only runs for the first page
I already said "based on the answer in the post". Check the answer, I said I used it. But for further advices I didn't edit with using it
wow
I solved the problem thanks to stackoverflow participations. Have a nice day.