material-react-table-narender 2.13.35 → 2.13.36

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": "2.13.35",
2
+ "version": "2.13.36",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table-narender",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -161,8 +161,6 @@ export const MRT_TableBodyRow = <TData extends MRT_RowData>({
161
161
  : `${darken(baseBackgroundColor, 0.3)}`
162
162
  : undefined;
163
163
 
164
- console.log('row.id', row);
165
-
166
164
  return (
167
165
  <>
168
166
  <TableRow
@@ -231,7 +229,6 @@ export const MRT_TableBodyRow = <TData extends MRT_RowData>({
231
229
  rowPinningDisplayMode?.includes('sticky') && isRowPinned ? 2 : 0,
232
230
  ...(sx as any),
233
231
  })}
234
- key={row?.original?.id}
235
232
  >
236
233
  {virtualPaddingLeft ? (
237
234
  <td style={{ display: 'flex', width: virtualPaddingLeft }} />
@@ -18,6 +18,7 @@ import {
18
18
  import { getCommonMRTCellStyles } from '../../utils/style.utils';
19
19
  import { parseFromValuesOrFunc } from '../../utils/utils';
20
20
  import { cellKeyboardShortcuts } from '../../utils/cell.utils';
21
+ import { Tooltip } from '@mui/material';
21
22
  // import { MRT_TableHeadCellToolBar } from './MRT_TableHeadCellToolBar';
22
23
 
23
24
  export interface MRT_TableHeadCellProps<TData extends MRT_RowData>
@@ -169,6 +170,8 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
169
170
  table,
170
171
  }) ?? columnDef.header;
171
172
 
173
+ const headerTooltip = columnDef.tooltip ?? columnDef.header;
174
+
172
175
  return (
173
176
  <TableCell
174
177
  align={
@@ -286,6 +289,7 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
286
289
  : undefined,
287
290
  }}
288
291
  >
292
+ <Tooltip title={headerTooltip} placement="top" arrow>
289
293
  <Box
290
294
  className="Mui-TableHeadCell-Content-Wrapper"
291
295
  sx={{
@@ -303,6 +307,7 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
303
307
  >
304
308
  {HeaderElement}
305
309
  </Box>
310
+ </Tooltip>
306
311
  {column.getCanFilter() && (
307
312
  <MRT_TableHeadCellFilterLabel header={header} table={table} />
308
313
  )}
package/src/types.ts CHANGED
@@ -560,6 +560,8 @@ export interface MRT_ColumnDef<TData extends MRT_RowData, TValue = unknown>
560
560
  * header must be a string. If you want custom JSX to render the header, you can also specify a `Header` option. (Capital H)
561
561
  */
562
562
  header: string;
563
+
564
+ tooltip?: string;
563
565
  /**
564
566
  * Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
565
567
  *