@tanstack/react-table 8.5.7 → 8.5.10

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.
@@ -4014,7 +4014,7 @@ var drawChart = (function (exports) {
4014
4014
  </script>
4015
4015
  <script>
4016
4016
  /*<!--*/
4017
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"75df-127"},{"name":"react-table/src/index.tsx","uid":"75df-129"}]}]}],"isRoot":true},"nodeParts":{"75df-127":{"renderedLength":138254,"gzipLength":23997,"brotliLength":0,"mainUid":"75df-126"},"75df-129":{"renderedLength":1900,"gzipLength":752,"brotliLength":0,"mainUid":"75df-128"}},"nodeMetas":{"75df-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"75df-127"},"imported":[],"importedBy":[{"uid":"75df-128"}]},"75df-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"75df-129"},"imported":[{"uid":"75df-130"},{"uid":"75df-126"}],"importedBy":[],"isEntry":true},"75df-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"75df-128"}],"isExternal":true}},"env":{"rollup":"2.77.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4017
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"00d2-127"},{"name":"react-table/src/index.tsx","uid":"00d2-129"}]}]}],"isRoot":true},"nodeParts":{"00d2-127":{"renderedLength":138375,"gzipLength":24016,"brotliLength":0,"mainUid":"00d2-126"},"00d2-129":{"renderedLength":1900,"gzipLength":752,"brotliLength":0,"mainUid":"00d2-128"}},"nodeMetas":{"00d2-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"00d2-127"},"imported":[],"importedBy":[{"uid":"00d2-128"}]},"00d2-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"00d2-129"},"imported":[{"uid":"00d2-130"},{"uid":"00d2-126"}],"importedBy":[],"isEntry":true},"00d2-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"00d2-128"}],"isExternal":true}},"env":{"rollup":"2.77.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4018
4018
 
4019
4019
  const run = () => {
4020
4020
  const width = window.innerWidth;
@@ -11,11 +11,11 @@
11
11
  "children": [
12
12
  {
13
13
  "name": "table-core/build/esm/index.js",
14
- "uid": "75df-132"
14
+ "uid": "00d2-132"
15
15
  },
16
16
  {
17
17
  "name": "react-table/src/index.tsx",
18
- "uid": "75df-134"
18
+ "uid": "00d2-134"
19
19
  }
20
20
  ]
21
21
  }
@@ -25,55 +25,55 @@
25
25
  "isRoot": true
26
26
  },
27
27
  "nodeParts": {
28
- "75df-132": {
29
- "renderedLength": 138254,
30
- "gzipLength": 23997,
28
+ "00d2-132": {
29
+ "renderedLength": 138375,
30
+ "gzipLength": 24016,
31
31
  "brotliLength": 0,
32
- "mainUid": "75df-131"
32
+ "mainUid": "00d2-131"
33
33
  },
34
- "75df-134": {
34
+ "00d2-134": {
35
35
  "renderedLength": 1900,
36
36
  "gzipLength": 752,
37
37
  "brotliLength": 0,
38
- "mainUid": "75df-133"
38
+ "mainUid": "00d2-133"
39
39
  }
40
40
  },
41
41
  "nodeMetas": {
42
- "75df-131": {
42
+ "00d2-131": {
43
43
  "id": "/packages/table-core/build/esm/index.js",
44
44
  "moduleParts": {
45
- "index.production.js": "75df-132"
45
+ "index.production.js": "00d2-132"
46
46
  },
47
47
  "imported": [],
48
48
  "importedBy": [
49
49
  {
50
- "uid": "75df-133"
50
+ "uid": "00d2-133"
51
51
  }
52
52
  ]
53
53
  },
54
- "75df-133": {
54
+ "00d2-133": {
55
55
  "id": "/packages/react-table/src/index.tsx",
56
56
  "moduleParts": {
57
- "index.production.js": "75df-134"
57
+ "index.production.js": "00d2-134"
58
58
  },
59
59
  "imported": [
60
60
  {
61
- "uid": "75df-135"
61
+ "uid": "00d2-135"
62
62
  },
63
63
  {
64
- "uid": "75df-131"
64
+ "uid": "00d2-131"
65
65
  }
66
66
  ],
67
67
  "importedBy": [],
68
68
  "isEntry": true
69
69
  },
70
- "75df-135": {
70
+ "00d2-135": {
71
71
  "id": "react",
72
72
  "moduleParts": {},
73
73
  "imported": [],
74
74
  "importedBy": [
75
75
  {
76
- "uid": "75df-133"
76
+ "uid": "00d2-133"
77
77
  }
78
78
  ],
79
79
  "isExternal": true
@@ -3815,8 +3815,12 @@
3815
3815
 
3816
3816
  function getExpandedRowModel() {
3817
3817
  return table => memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
3818
- if (!rowModel.rows.length || // Do not expand if rows are not included in pagination
3819
- !paginateExpandedRows || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
3818
+ if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
3819
+ return rowModel;
3820
+ }
3821
+
3822
+ if (!paginateExpandedRows) {
3823
+ // Only expand rows at this point if they are being paginated
3820
3824
  return rowModel;
3821
3825
  }
3822
3826
 
@@ -3830,7 +3834,7 @@
3830
3834
  }
3831
3835
  });
3832
3836
  }
3833
- function expandRows(rowModel, table) {
3837
+ function expandRows(rowModel) {
3834
3838
  const expandedRows = [];
3835
3839
 
3836
3840
  const handleRow = row => {
@@ -3852,7 +3856,7 @@
3852
3856
  }
3853
3857
 
3854
3858
  function getPaginationRowModel(opts) {
3855
- return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel()], (pagination, rowModel) => {
3859
+ return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {
3856
3860
  if (!rowModel.rows.length) {
3857
3861
  return rowModel;
3858
3862
  }