material-react-table 1.11.2 → 1.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.11.2",
2
+ "version": "1.11.3",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -124,7 +124,6 @@ export const MRT_TableBody = ({
124
124
  estimateSize: () =>
125
125
  density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73,
126
126
  getScrollElement: () => tableContainerRef.current,
127
- measureElement: (element) => element?.getBoundingClientRect().height,
128
127
  overscan: 4,
129
128
  ...vProps_old,
130
129
  ...vProps,
@@ -1,6 +1,6 @@
1
1
  import React, { DragEvent, memo, useRef } from 'react';
2
2
  import TableRow from '@mui/material/TableRow';
3
- import { alpha, darken, lighten } from '@mui/material/styles';
3
+ import { type Theme, alpha, darken, lighten } from '@mui/material/styles';
4
4
  import { Memo_MRT_TableBodyCell, MRT_TableBodyCell } from './MRT_TableBodyCell';
5
5
  import { MRT_TableDetailPanel } from './MRT_TableDetailPanel';
6
6
  import type { VirtualItem, Virtualizer } from '@tanstack/react-virtual';
@@ -71,17 +71,15 @@ export const MRT_TableBodyRow = ({
71
71
  }
72
72
  }}
73
73
  {...tableRowProps}
74
- sx={(theme) => ({
74
+ sx={(theme: Theme) => ({
75
75
  backgroundColor: lighten(theme.palette.background.default, 0.06),
76
+ boxSizing: 'border-box',
76
77
  display: layoutMode === 'grid' ? 'flex' : 'table-row',
77
78
  opacity:
78
79
  draggingRow?.id === row.id || hoveredRow?.id === row.id ? 0.5 : 1,
79
80
  position: virtualRow ? 'absolute' : undefined,
80
- top: virtualRow ? 0 : undefined,
81
- transform: virtualRow
82
- ? `translateY(${virtualRow?.start}px)`
83
- : undefined,
84
81
  transition: virtualRow ? 'none' : 'all 150ms ease-in-out',
82
+ top: virtualRow ? 0 : undefined,
85
83
  width: '100%',
86
84
  '&:hover td': {
87
85
  backgroundColor:
@@ -97,6 +95,12 @@ export const MRT_TableBodyRow = ({
97
95
  ? tableRowProps.sx(theme)
98
96
  : (tableRowProps?.sx as any)),
99
97
  })}
98
+ style={{
99
+ transform: virtualRow
100
+ ? `translateY(${virtualRow?.start}px)`
101
+ : undefined,
102
+ ...tableRowProps?.style,
103
+ }}
100
104
  >
101
105
  {virtualPaddingLeft ? (
102
106
  <td style={{ display: 'flex', width: virtualPaddingLeft }} />