-
+ {!rowPinningDisplayMode?.includes('sticky') &&
+ getIsSomeRowsPinned('top') && (
+ ({
+ display: layoutMode === 'grid' ? 'grid' : 'table-row-group',
+ position: 'sticky',
+ top: tableHeadHeight - 1,
+ zIndex: 1,
+ ...(parseFromValuesOrFunc(tableBodyProps?.sx, theme) as any),
+ })}
+ >
+ {getTopRows().map((row, rowIndex) => {
+ const props = {
+ columnVirtualizer,
+ measureElement: rowVirtualizer?.measureElement,
+ numRows: rows.length,
+ row,
+ rowIndex,
+ table,
+ virtualColumns,
+ virtualPaddingLeft,
+ virtualPaddingRight,
+ };
+ return memoMode === 'rows' ? (
+
+ ) : (
+
+ );
+ })}
+
+ )}
+ ({
+ display: layoutMode === 'grid' ? 'grid' : 'table-row-group',
+ height: rowVirtualizer
+ ? `${rowVirtualizer.getTotalSize()}px`
+ : 'inherit',
+ minHeight: !rows.length ? '100px' : undefined,
+ position: 'relative',
+ ...(parseFromValuesOrFunc(tableBodyProps?.sx, theme) as any),
+ })}
+ >
+ {tableBodyProps?.children ??
+ (!rows.length ? (
+
- {renderEmptyRowsFallback?.({ table }) ?? (
-
- {globalFilter || columnFilters.length
- ? localization.noResultsFound
- : localization.noRecordsToDisplay}
-
- )}
-
-
- ) : (
- <>
- {(virtualRows ?? rows).map((rowOrVirtualRow, rowIndex) => {
- const row = rowVirtualizer
- ? rows[rowOrVirtualRow.index]
- : (rowOrVirtualRow as MRT_Row);
+
+ {renderEmptyRowsFallback?.({ table }) ?? (
+
+ {globalFilter || columnFilters.length
+ ? localization.noResultsFound
+ : localization.noRecordsToDisplay}
+
+ )}
+ |
+ |
+ ) : (
+ <>
+ {(virtualRows ?? rows).map((rowOrVirtualRow, rowIndex) => {
+ const row = rowVirtualizer
+ ? rows[rowOrVirtualRow.index]
+ : (rowOrVirtualRow as MRT_Row