I have table component and i can customize of table column. I can relocate and also hide/show of table column.
So how can i store user customizing of table column in client cache?
Given that I don't know what package are you using to handle "table customization", I think that you could save your "custom configuration" on the local storage using localStorage.set('user custom table configuration', JSON.stringify(configObject))
.
To retrieve it, on the componentDidMount
lifecycle method, you can read it and save it in the state with localStorage.get('user custom table configuration')
. Consider that:
JSON.parse
it;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.