Fix(sistent): Added Table component documentation#7737
Conversation
Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
|
Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
7c757d5 to
95f770c
Compare
|
@rishiraj38, @saurabhraghuvanshii, please have a look. |
There was a problem hiding this comment.
Selectable table component is not working. Please take reference from:
UI reference:
https://playground.meshery.io/configuration/designs?view=table
Code reference:
https://github.com/meshery/meshery/blob/master/ui/components/designs/patterns/MesheryPatterns.tsx#L532
|
@kanishksingh23 Thank you for your contribution! Let's discuss this during the website call tomorrow at 5:30 PM IST | 7 AM CST Add it as an agenda item to the meeting minutes, if you would 🙂 |
…ble handle checkboxes internally Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
7a88b6f to
857c6b9
Compare
|
Hey @rishiraj38, I have matched the implementation exactly to MesheryPatterns.tsx. But still, the checkboxes are not selectable. I think it's a Gatsby preview deployment issue. |
|
Waiting for preview.... |
rishiraj38
left a comment
There was a problem hiding this comment.
@kanishksingh23 I checked this locally as well, so it doesn’t seem to be a Gatsby deployment issue. Could you please take another look and fix it?
Screen.Recording.2026-05-20.at.9.07.42.PM.mov
…dDataAccess Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
907bd5a to
5b59aa7
Compare
…per pattern Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
|
Hey @rishiraj38 I've been thoroughly debugging the checkbox selection issue. I found React hydration errors in the browser console. I also checked the compiled @sistent/sistent bundle and confirmed ResponsiveDataTable doesn't override selectableRows. I noticed that other interactive components, like Popper, use no mount guard at all. Should I follow the same pattern for ResponsiveDataTable? Also, ResponsiveDataTable is the only usage of this component in the entire Layer5 repo, so there's no existing pattern to reference. Could you share a minimal working example of SelectableTableDemo with selectableRows: "multiple" that works locally? Also, I am currently in my end semester exams, so my responses might be a bit slow. I will get back to this as soon as I can. |
…uard Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
4b33b97 to
5ee34ca
Compare
Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
Replace mounted state guard with NoSsr wrapper from @sistent/sistent to prevent server-side rendering of ResponsiveDataTable. This fixes React hydration errors layer5io#418 and layer5io#423 caused by MUIDataTable generating different DOM on server vs client, which was preventing checkbox event handlers from attaching in the SelectableTableDemo. This follows the same pattern used in the Meshery UI codebase (MesheryPatterns.tsx) where ResponsiveDataTable is wrapped with NoSsr. Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
The @sistent/mui-datatables fork used by ResponsiveDataTable has a bug where checkbox click handlers fire but don't process selection state changes (confirmed via Event Listeners tab - handlers ARE attached but selection doesn't toggle). This was investigated across 10+ attempts including NoSsr, mounted guards, data format changes, and controlled vs uncontrolled selection state - none worked. Replace SelectableTableDemo with plain MUI Table, TableHead, TableBody, TableRow, TableCell, and Checkbox components. This uses direct React event handlers for selection, matching the guidance.mdx pattern of placing a Checkbox in the first cell of each row. Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
The Sistent Checkbox wrapper doesn't reliably forward onChange events. Switch to onClick and toggle based on current selection state instead of event.target.checked for more robust behavior. Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
…ndency Signed-off-by: kanishksingh23 <kanishksingh763@gmail.com>
|
@rishiraj38 The checkboxes are now working! Here is a quick summary of the debugging journey and a few observations I made along the way that might be helpful. Observation 1: ResponsiveDataTable Checkbox Interaction FIX: I replaced it with plain MUI Table + Checkbox components just for the Selectable Rows demo so the docs have a working example. Direct React onClick state management works perfectly here. Observation 2: Checkbox Wrapper Event Handling FIX: I bypassed the event object entirely. The onChange handler now determines the next state purely based on our current React state (selected.length === data.length), which works flawlessly. |
|
@rishiraj38 review please |





Description
Adds Table component documentation to the Sistent component library, including:
All demos use
ResponsiveDataTablefrom@sistent/sistent.This PR fixes #7607
Notes for Reviewers
useMemofor stable column/data referencesrowsSelectedandonRowSelectionChangemountedstate guard to fix SSR build failuresSigned commits