useTableState: A reusable hook for server-side table state management
Open
@Salmaan-M is already working on this.
Since Jun 30, 2026.
component/components
- Dominant language
- TypeScript
- Stars
- 137
- Forks
- 239
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 5
Description
Current Behavior
Across Meshery UI, every data table page independently declares the same set of useState calls to manage server-side pagination, search, and sort state — typically page, pageSize, search, and sortOrder. Some pages add filter state on top. This results in 4–8 identical useState lines duplicated across 8+ files :-
- https://github.com/meshery/meshery/blob/master/ui/components/dashboard/resources/resources-table.tsx
- https://github.com/meshery/meshery/blob/master/ui/components/connections/meshSync/index.tsx
- https://github.com/meshery/meshery/blob/master/ui/components/performance/PerformanceProfiles.tsx
- https://github.com/meshery/meshery/blob/master/ui/components/workspaces/index.tsx
- https://github.com/meshery/meshery/blob/master/ui/components/environments/index.tsx
- https://github.com/meshery/meshery/blob/master/ui/components/DatabaseSummary.tsx
- https://github.com/meshery/meshery/blob/master/ui/components/filters/Filters.tsx
- https://github.com/meshery/meshery/blob/master/ui/components/connections/ConnectionTable.tsx
Expected Behavior
A reusable, framework-agnostic useTableState hook in Sistent that:
- Manages page, pageSize, search, sortOrder, and optional custom filters state
- Provides setter functions (setPage, setPageSize, setSearch, setSortOrder)
Environment
Contributor Guides and Resources
- 🛠 Meshery Build & Release Strategy
- 📚 Instructions for contributing to documentation
- 🎨 Wireframes and designs for Sistent site in Figma (open invite)
- 🙋🏾🙋🏼 Questions: Layer5 Discussion Forum and Layer5 Community Slack
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.