material-react-table 0.36.0 → 0.36.1

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": "0.36.0",
2
+ "version": "0.36.1",
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.",
@@ -277,7 +277,10 @@ export const MRT_TableBodyCell: FC<Props> = ({
277
277
  rowRef={rowRef}
278
278
  table={table}
279
279
  />
280
- ) : columnDefType === 'display' ? (
280
+ ) : columnDefType === 'display' &&
281
+ (column.id === 'mrt-row-select' ||
282
+ column.id === 'mrt-row-expand' ||
283
+ !row.getIsGrouped()) ? (
281
284
  columnDef.Cell?.({ cell, column, table })
282
285
  ) : isEditing ? (
283
286
  <MRT_EditCellTextField cell={cell} table={table} />
@@ -286,15 +289,20 @@ export const MRT_TableBodyCell: FC<Props> = ({
286
289
  <>
287
290
  <MRT_CopyButton cell={cell} table={table}>
288
291
  <>
289
- {columnDef?.Cell?.({ cell, column, table }) ??
290
- cell.renderValue()}
292
+ {row.getIsGrouped() && !cell.getIsGrouped()
293
+ ? null
294
+ : columnDef?.Cell?.({ cell, column, table }) ??
295
+ cell.renderValue()}
291
296
  </>
292
297
  </MRT_CopyButton>
293
298
  {cell.getIsGrouped() && <> ({row.subRows?.length})</>}
294
299
  </>
295
300
  ) : (
296
301
  <>
297
- {columnDef?.Cell?.({ cell, column, table }) ?? cell.renderValue()}
302
+ {row.getIsGrouped() && !cell.getIsGrouped()
303
+ ? null
304
+ : columnDef?.Cell?.({ cell, column, table }) ??
305
+ cell.renderValue()}
298
306
  {cell.getIsGrouped() && <> ({row.subRows?.length ?? ''})</>}
299
307
  </>
300
308
  )}