Examples
Persistent View Example
An example of Shadcn Table that saves the view to localStorage and restores it on reload.
With persistViewSettings: true, Shadcn Table stores the view in localStorage and restores it on reload. Change a few settings or drag a column header, then reload the page. Learn more in the View Settings Guide.
Try it
- Turn on
Row numbersabove the table, then reload the page. The row numbers are still there. - Drag the
Statusheader beforeNameand reload. The new order is kept. - Open
View settingsand clickReset view. The table returns to its first look.