@tanstack/vue-table 8.5.8 → 8.5.9

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":"2953-149"},{"name":"vue-table/src","children":[{"uid":"2953-151","name":"merge-proxy.ts"},{"uid":"2953-153","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"2953-149":{"renderedLength":138254,"gzipLength":23997,"brotliLength":0,"mainUid":"2953-148"},"2953-151":{"renderedLength":1622,"gzipLength":660,"brotliLength":0,"mainUid":"2953-150"},"2953-153":{"renderedLength":1748,"gzipLength":687,"brotliLength":0,"mainUid":"2953-152"}},"nodeMetas":{"2953-148":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"2953-149"},"imported":[],"importedBy":[{"uid":"2953-152"}]},"2953-150":{"id":"/packages/vue-table/src/merge-proxy.ts","moduleParts":{"index.production.js":"2953-151"},"imported":[],"importedBy":[{"uid":"2953-152"}]},"2953-152":{"id":"/packages/vue-table/src/index.ts","moduleParts":{"index.production.js":"2953-153"},"imported":[{"uid":"2953-148"},{"uid":"2953-154"},{"uid":"2953-150"}],"importedBy":[],"isEntry":true},"2953-154":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"2953-152"}],"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":"45a2-149"},{"name":"vue-table/src","children":[{"uid":"45a2-151","name":"merge-proxy.ts"},{"uid":"45a2-153","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"45a2-149":{"renderedLength":138454,"gzipLength":24035,"brotliLength":0,"mainUid":"45a2-148"},"45a2-151":{"renderedLength":1622,"gzipLength":660,"brotliLength":0,"mainUid":"45a2-150"},"45a2-153":{"renderedLength":1748,"gzipLength":687,"brotliLength":0,"mainUid":"45a2-152"}},"nodeMetas":{"45a2-148":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"45a2-149"},"imported":[],"importedBy":[{"uid":"45a2-152"}]},"45a2-150":{"id":"/packages/vue-table/src/merge-proxy.ts","moduleParts":{"index.production.js":"45a2-151"},"imported":[],"importedBy":[{"uid":"45a2-152"}]},"45a2-152":{"id":"/packages/vue-table/src/index.ts","moduleParts":{"index.production.js":"45a2-153"},"imported":[{"uid":"45a2-148"},{"uid":"45a2-154"},{"uid":"45a2-150"}],"importedBy":[],"isEntry":true},"45a2-154":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"45a2-152"}],"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,17 +11,17 @@
11
11
  "children": [
12
12
  {
13
13
  "name": "table-core/build/esm/index.js",
14
- "uid": "2953-156"
14
+ "uid": "45a2-156"
15
15
  },
16
16
  {
17
17
  "name": "vue-table/src",
18
18
  "children": [
19
19
  {
20
- "uid": "2953-158",
20
+ "uid": "45a2-158",
21
21
  "name": "merge-proxy.ts"
22
22
  },
23
23
  {
24
- "uid": "2953-160",
24
+ "uid": "45a2-160",
25
25
  "name": "index.ts"
26
26
  }
27
27
  ]
@@ -34,76 +34,76 @@
34
34
  "isRoot": true
35
35
  },
36
36
  "nodeParts": {
37
- "2953-156": {
38
- "renderedLength": 138254,
39
- "gzipLength": 23997,
37
+ "45a2-156": {
38
+ "renderedLength": 138454,
39
+ "gzipLength": 24035,
40
40
  "brotliLength": 0,
41
- "mainUid": "2953-155"
41
+ "mainUid": "45a2-155"
42
42
  },
43
- "2953-158": {
43
+ "45a2-158": {
44
44
  "renderedLength": 1622,
45
45
  "gzipLength": 660,
46
46
  "brotliLength": 0,
47
- "mainUid": "2953-157"
47
+ "mainUid": "45a2-157"
48
48
  },
49
- "2953-160": {
49
+ "45a2-160": {
50
50
  "renderedLength": 1748,
51
51
  "gzipLength": 687,
52
52
  "brotliLength": 0,
53
- "mainUid": "2953-159"
53
+ "mainUid": "45a2-159"
54
54
  }
55
55
  },
56
56
  "nodeMetas": {
57
- "2953-155": {
57
+ "45a2-155": {
58
58
  "id": "/packages/table-core/build/esm/index.js",
59
59
  "moduleParts": {
60
- "index.production.js": "2953-156"
60
+ "index.production.js": "45a2-156"
61
61
  },
62
62
  "imported": [],
63
63
  "importedBy": [
64
64
  {
65
- "uid": "2953-159"
65
+ "uid": "45a2-159"
66
66
  }
67
67
  ]
68
68
  },
69
- "2953-157": {
69
+ "45a2-157": {
70
70
  "id": "/packages/vue-table/src/merge-proxy.ts",
71
71
  "moduleParts": {
72
- "index.production.js": "2953-158"
72
+ "index.production.js": "45a2-158"
73
73
  },
74
74
  "imported": [],
75
75
  "importedBy": [
76
76
  {
77
- "uid": "2953-159"
77
+ "uid": "45a2-159"
78
78
  }
79
79
  ]
80
80
  },
81
- "2953-159": {
81
+ "45a2-159": {
82
82
  "id": "/packages/vue-table/src/index.ts",
83
83
  "moduleParts": {
84
- "index.production.js": "2953-160"
84
+ "index.production.js": "45a2-160"
85
85
  },
86
86
  "imported": [
87
87
  {
88
- "uid": "2953-155"
88
+ "uid": "45a2-155"
89
89
  },
90
90
  {
91
- "uid": "2953-161"
91
+ "uid": "45a2-161"
92
92
  },
93
93
  {
94
- "uid": "2953-157"
94
+ "uid": "45a2-157"
95
95
  }
96
96
  ],
97
97
  "importedBy": [],
98
98
  "isEntry": true
99
99
  },
100
- "2953-161": {
100
+ "45a2-161": {
101
101
  "id": "vue",
102
102
  "moduleParts": {},
103
103
  "imported": [],
104
104
  "importedBy": [
105
105
  {
106
- "uid": "2953-159"
106
+ "uid": "45a2-159"
107
107
  }
108
108
  ],
109
109
  "isExternal": true
@@ -3795,8 +3795,13 @@
3795
3795
 
3796
3796
  function getExpandedRowModel() {
3797
3797
  return table => memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
3798
- if (!rowModel.rows.length || // Do not expand if rows are not included in pagination
3799
- !paginateExpandedRows || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
3798
+ if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
3799
+ return rowModel;
3800
+ }
3801
+
3802
+ if (!paginateExpandedRows) {
3803
+ // Only expand rows at this point if they are being paginated
3804
+ console.log(rowModel.rows);
3800
3805
  return rowModel;
3801
3806
  }
3802
3807
 
@@ -3810,7 +3815,7 @@
3810
3815
  }
3811
3816
  });
3812
3817
  }
3813
- function expandRows(rowModel, table) {
3818
+ function expandRows(rowModel) {
3814
3819
  const expandedRows = [];
3815
3820
 
3816
3821
  const handleRow = row => {
@@ -3832,7 +3837,7 @@
3832
3837
  }
3833
3838
 
3834
3839
  function getPaginationRowModel(opts) {
3835
- return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel()], (pagination, rowModel) => {
3840
+ return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {
3836
3841
  if (!rowModel.rows.length) {
3837
3842
  return rowModel;
3838
3843
  }
@@ -3865,6 +3870,7 @@
3865
3870
  };
3866
3871
  }
3867
3872
 
3873
+ console.log(paginatedRowModel.rows);
3868
3874
  paginatedRowModel.flatRows = [];
3869
3875
 
3870
3876
  const handleRow = row => {