diff --git a/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx b/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx index 83a2252b..0ed4a9d1 100644 --- a/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +++ b/packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx @@ -443,16 +443,7 @@ export default function SimpleTableManual(props: PropsWithChildren { - // Use the original index recorded on the row (set in generateRowsData) - // so that filtering (which shrinks rowData but not `elements`) still maps - // each surviving row to the correct rendered cells. - const originalIndex = (el[0] as any)?.__originalIndex ?? el[1]; - newElements[index] = elements[originalIndex]; - }); - return newElements; + return stabilizedThis.map(([el]) => el); } function _menuClick(event, columnId: string, columnType: string, labelValue: string) { @@ -699,39 +690,38 @@ export default function SimpleTableManual(props: PropsWithChildren 0 && - stableSort(rowData, getComparator(order, orderBy)) - .slice(0) - .map((row, index) => { - return ( - - {row?.map((item, childIndex) => { - const theColKey = displayedColumns[childIndex]; - return ( - - {item} - - ); - })} - {showDeleteButton && ( - -
- { - editMenuClick(event, index); - }} - /> - - editRecord()}>Edit - deleteRecord()}>Delete - -
+ stableSort(rowData, getComparator(order, orderBy)).map((row: any, displayIndex) => { + const originalIndex = row.__originalIndex; + return ( + + {(elements as any[])[originalIndex]?.map((item, childIndex) => { + const theColKey = displayedColumns[childIndex]; + return ( + + {item} - )} - - ); - })} + ); + })} + {showDeleteButton && ( + +
+ { + editMenuClick(event, originalIndex); + }} + /> + + editRecord()}>Edit + deleteRecord()}>Delete + +
+
+ )} +
+ ); + })} {((readOnlyMode && (!rowData || rowData?.length === 0)) ||