material-react-table 1.5.6 → 1.5.7

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.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { MRT_Cell, MRT_Column, MRT_ColumnDef, MRT_FilterOption, MRT_Row, MRT_TableInstance, MRT_TableState, MaterialReactTableProps, MRT_Localization } from '..';
2
+ import type { MRT_Cell, MRT_Column, MRT_ColumnDef, MRT_FilterOption, MRT_Localization, MRT_Row, MRT_TableInstance, MRT_TableState, MaterialReactTableProps } from '..';
3
3
  export declare const MRT_TableRoot: <TData extends Record<string, any> = {}>(props: Omit<Partial<import("@tanstack/react-table").TableOptions<TData>>, "state" | "data" | "onStateChange" | "initialState" | "getRowId" | "columns" | "defaultColumn" | "globalFilterFn" | "enableRowSelection" | "expandRowsFn"> & {
4
4
  columnFilterModeOptions?: (string & MRT_FilterOption)[] | null | undefined;
5
5
  columns: MRT_ColumnDef<TData>[];
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.6",
2
+ "version": "1.5.7",
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.",
@@ -165,5 +165,5 @@ export const MRT_TableBodyRow: FC<Props> = ({
165
165
 
166
166
  export const Memo_MRT_TableBodyRow = memo(
167
167
  MRT_TableBodyRow,
168
- (prev, next) => prev.row === next.row,
168
+ (prev, next) => (prev.row === next.row && prev.rowIndex === next.rowIndex),
169
169
  );
@@ -32,11 +32,11 @@ import type {
32
32
  MRT_Column,
33
33
  MRT_ColumnDef,
34
34
  MRT_FilterOption,
35
+ MRT_Localization,
35
36
  MRT_Row,
36
37
  MRT_TableInstance,
37
38
  MRT_TableState,
38
39
  MaterialReactTableProps,
39
- MRT_Localization,
40
40
  } from '..';
41
41
 
42
42
  export const MRT_TableRoot = <TData extends Record<string, any> = {}>(
@@ -42,11 +42,13 @@ export const MRT_BottomToolbar: FC<Props> = ({ table }) => {
42
42
  <Toolbar
43
43
  variant="dense"
44
44
  {...toolbarProps}
45
- ref={(ref: HTMLDivElement) => {
46
- bottomToolbarRef.current = ref;
47
- if (toolbarProps?.ref) {
48
- // @ts-ignore
49
- toolbarProps.ref.current = ref;
45
+ ref={(node: HTMLDivElement) => {
46
+ if (node) {
47
+ bottomToolbarRef.current = node;
48
+ if (toolbarProps?.ref) {
49
+ // @ts-ignore
50
+ toolbarProps.ref.current = node;
51
+ }
50
52
  }
51
53
  }}
52
54
  sx={(theme) =>