td]:border-b"
- )}
+ className={cn(props.tableLayout?.rowBorder && bodyRowBottomBorderClasses)}
>
@@ -1022,9 +1145,7 @@ function DataGridTableBodyRowCell({
return (
({
cell.column.columnDef.meta?.cellClassName,
props.tableLayout?.columnsPinnable &&
column.getCanPin() &&
- '[&[data-pinned][data-last-col]]:border-border data-pinned:bg-background/90 data-pinned:backdrop-blur-xs" [&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right][data-last-col=right]]:border-s!',
+ cn(
+ "data-pinned:bg-background data-pinned:isolate",
+ "[&[data-pinned=left][data-last-col=left]]:shadow-[inset_-1px_0_0_0_var(--border)]",
+ "[&[data-pinned=right][data-last-col=right]]:shadow-[inset_1px_0_0_0_var(--border)]"
+ ),
column.getIndex() === 0 ||
column.getIndex() === row.getVisibleCells().length - 1
? props.tableClassNames?.edgeCell
@@ -1069,6 +1194,12 @@ function DataGridTableRenderedRow({
pinnedBoundary?: DataGridTablePinnedBoundary
rowRef?: React.Ref
}) {
+ const { props, table } = useDataGrid()
+ const leftVisibleCells = row.getLeftVisibleCells()
+ const centerVisibleCells = row.getCenterVisibleCells()
+ const rightVisibleCells = row.getRightVisibleCells()
+ const hasRightPinnedColumns = hasDataGridTableRightPinnedColumns(table)
+
return (
({
pinnedBoundary={pinnedBoundary}
rowRef={rowRef}
>
- {row.getVisibleCells().map((cell: Cell) => (
+ {[...leftVisibleCells, ...centerVisibleCells].map(
+ (cell: Cell) => (
+
+ {flexRender(cell.column.columnDef.cell, cell.getContext())}
+
+ )
+ )}
+ {props.tableLayout?.columnsResizable && hasRightPinnedColumns ? (
+
+ ) : null}
+ {rightVisibleCells.map((cell: Cell) => (
{flexRender(cell.column.columnDef.cell, cell.getContext())}
))}
+ {props.tableLayout?.columnsResizable && !hasRightPinnedColumns ? (
+
+ ) : null}
{row.getIsExpanded() && }
@@ -1090,16 +1234,16 @@ function DataGridTableRenderedRow({
function DataGridTableEmpty() {
const { table, props } = useDataGrid()
const visibleColumnCount =
- table.getVisibleLeafColumns().length +
+ getDataGridTableOrderedVisibleColumns(table).length +
(props.tableLayout?.columnsResizable ? 1 : 0)
return (
|
- {props.emptyMessage || DATA_GRID_MESSAGES_RU.emptyMessage}
+ {props.emptyMessage || "No data available"}
|
)
@@ -1110,9 +1254,9 @@ function DataGridTableLoader() {
return (
-
+
- {props.loadingMessage || DATA_GRID_MESSAGES_RU.loadingMessage}
+ {props.loadingMessage || "Loading..."}
)
@@ -1124,7 +1268,7 @@ function DataGridTableRowPin ({ row }: { row: Row }) {
return (
|
|
@@ -1289,35 +1449,29 @@ const MemoizedDataGridTableBodyRows = memo(
function DataGridTableHeader