I'm trying to store a table's data locally. I'm a bit confused about where I should store the cells; in an array? Will the array return each cell in the correct row index? How should I set the local data variable if I'm passing rows and a table as the arguments?
In my code, the table creates a new row from user input. When I refresh, the table goes away. I'd like to keep the table from the previous session.
Here's what I have so far:
(press the play button to run the code)
Top comments (4)
Thanks! I'll look that up.
Hi, You can store the data in local storage, and if you want the data to be in order, you can do this
Example data format =
Now when the user refreshes the page, you can take the data from local storage, sort it by id and display it
Interesting. Thank you!