function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kumar_ShahKumar_Shah 

How to Persist value between components while navigating from one page to another page

Hello,

I would like to persist value in lightning components, similar to the session variable but this is on client-side only. E.g. I would like to store Listview sorting order when a user navigates from page 1 to page 2. When the user returns back to page 1, I would like to display the same sorting order. One of the ways is events but I was looking for other options. Tried to search on sessionStorage but didn't find more help on it.

Thanks,
ravi soniravi soni
hi kumar shah,
Please tell me more detail about your requirment. I will try to fixed your Issue.
Thank you
Kumar_ShahKumar_Shah
Thanks for the reply, Veer.

I am working on a lightning community. There are two pages, one has Account List view where user can sort the list view based on the account name and other columns. By clicking on the account name, the user can redirect to account details page. Account List view and account details page are different pages and each page has their own independent component. When the user goes back from an account details page to account list view, I would like to persist the sorted column selection. E.g. if the user clicked on Account created date then it should persist.

Thanks,