Open mayraGL opened 5 years ago
Hi @mayraGL, not sure if I get what you’re trying to do but do you want to persist the state of the table rows i.e. which table rows are expanded when a user refreshes the table or uses pagination?
When you’re lazy loading the data you have two options:
Persist the state on the the server Let’s say the user clicks on a row to get more details, if you make a server request to fetch the details using an id, you could toggle a property for that item and return the state from the server and use it to determine if the row should be expanded or not.
Persist the state in the client Same as the first option but instead of persisting the state on the server you store it locally in a service or local storage etc. and next time you fetch data you use the id’s stored locally to determine if the row should be expanded or not.
If I remember it correctly there should be an option to do number 2 by specifying a unique id that should be used but I have to look it up when I have access to the code.
But did I get your question right?
@Hi @hjalmers. I tried to persist in the client like this but didn't works
Hi @hjalmers
I have a table like this. The user can expand all the rows in the table. But when the table is lazy loading and changes the page the rows not showing expanded. There is any configuration to do it?