[data grid] Saved state from localStorage will not restore on page reload or page navigate #13963
Labels
bug 🐛
Something doesn't work
component: data grid
This is the name of the generic UI component, not the React module!
duplicate
This issue or pull request already exists
support: premium standard
Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/
Steps to reproduce
Link to live example: (required)
Steps:
Current behavior
When copied/pasted directly from the docs, it works with Demo Data. The demo has been expanded to be a reusable DataGrid with this behavior. However, as soon as you make the example component a child component with columns, rows, and other attributes as props passed in from the parent/page, the state of the grid does not restore.
Expected behavior
State should restore on load/mount. Column visibility, dimensions, order, etc.
Context
Create a reusable DataGrid implementation for varying sets of data/use cases. Each use case will also pass in a key/id to use as the localStorage key for retrieving the stored state.
Your environment
Using Chrome and/or Edge
npx @mui/envinfo
Search keywords: DataGridPremium state restore save
Order ID: 80915
The text was updated successfully, but these errors were encountered: