@tanstack/vue-table 8.5.28 → 8.6.0

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.
@@ -4024,7 +4024,7 @@ var drawChart = (function (exports) {
4024
4024
  </script>
4025
4025
  <script>
4026
4026
  /*<!--*/
4027
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"10ed-149"},{"name":"vue-table/src","children":[{"uid":"10ed-151","name":"merge-proxy.ts"},{"uid":"10ed-153","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"10ed-149":{"renderedLength":126592,"gzipLength":22412,"brotliLength":0,"mainUid":"10ed-148"},"10ed-151":{"renderedLength":1607,"gzipLength":655,"brotliLength":0,"mainUid":"10ed-150"},"10ed-153":{"renderedLength":1675,"gzipLength":658,"brotliLength":0,"mainUid":"10ed-152"}},"nodeMetas":{"10ed-148":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"10ed-149"},"imported":[],"importedBy":[{"uid":"10ed-152"}]},"10ed-150":{"id":"/packages/vue-table/src/merge-proxy.ts","moduleParts":{"index.production.js":"10ed-151"},"imported":[],"importedBy":[{"uid":"10ed-152"}]},"10ed-152":{"id":"/packages/vue-table/src/index.ts","moduleParts":{"index.production.js":"10ed-153"},"imported":[{"uid":"10ed-148"},{"uid":"10ed-154"},{"uid":"10ed-150"}],"importedBy":[],"isEntry":true},"10ed-154":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"10ed-152"}],"isExternal":true}},"env":{"rollup":"2.79.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4027
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"7238-149"},{"name":"vue-table/src","children":[{"uid":"7238-151","name":"merge-proxy.ts"},{"uid":"7238-153","name":"index.ts"}]}]}]}],"isRoot":true},"nodeParts":{"7238-149":{"renderedLength":126934,"gzipLength":22466,"brotliLength":0,"mainUid":"7238-148"},"7238-151":{"renderedLength":1607,"gzipLength":655,"brotliLength":0,"mainUid":"7238-150"},"7238-153":{"renderedLength":1675,"gzipLength":658,"brotliLength":0,"mainUid":"7238-152"}},"nodeMetas":{"7238-148":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"7238-149"},"imported":[],"importedBy":[{"uid":"7238-152"}]},"7238-150":{"id":"/packages/vue-table/src/merge-proxy.ts","moduleParts":{"index.production.js":"7238-151"},"imported":[],"importedBy":[{"uid":"7238-152"}]},"7238-152":{"id":"/packages/vue-table/src/index.ts","moduleParts":{"index.production.js":"7238-153"},"imported":[{"uid":"7238-148"},{"uid":"7238-154"},{"uid":"7238-150"}],"importedBy":[],"isEntry":true},"7238-154":{"id":"vue","moduleParts":{},"imported":[],"importedBy":[{"uid":"7238-152"}],"isExternal":true}},"env":{"rollup":"2.79.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
4028
4028
 
4029
4029
  const run = () => {
4030
4030
  const width = window.innerWidth;
@@ -11,17 +11,17 @@
11
11
  "children": [
12
12
  {
13
13
  "name": "table-core/build/esm/index.js",
14
- "uid": "10ed-156"
14
+ "uid": "7238-156"
15
15
  },
16
16
  {
17
17
  "name": "vue-table/src",
18
18
  "children": [
19
19
  {
20
- "uid": "10ed-158",
20
+ "uid": "7238-158",
21
21
  "name": "merge-proxy.ts"
22
22
  },
23
23
  {
24
- "uid": "10ed-160",
24
+ "uid": "7238-160",
25
25
  "name": "index.ts"
26
26
  }
27
27
  ]
@@ -34,76 +34,76 @@
34
34
  "isRoot": true
35
35
  },
36
36
  "nodeParts": {
37
- "10ed-156": {
38
- "renderedLength": 126592,
39
- "gzipLength": 22412,
37
+ "7238-156": {
38
+ "renderedLength": 126934,
39
+ "gzipLength": 22466,
40
40
  "brotliLength": 0,
41
- "mainUid": "10ed-155"
41
+ "mainUid": "7238-155"
42
42
  },
43
- "10ed-158": {
43
+ "7238-158": {
44
44
  "renderedLength": 1607,
45
45
  "gzipLength": 655,
46
46
  "brotliLength": 0,
47
- "mainUid": "10ed-157"
47
+ "mainUid": "7238-157"
48
48
  },
49
- "10ed-160": {
49
+ "7238-160": {
50
50
  "renderedLength": 1675,
51
51
  "gzipLength": 658,
52
52
  "brotliLength": 0,
53
- "mainUid": "10ed-159"
53
+ "mainUid": "7238-159"
54
54
  }
55
55
  },
56
56
  "nodeMetas": {
57
- "10ed-155": {
57
+ "7238-155": {
58
58
  "id": "/packages/table-core/build/esm/index.js",
59
59
  "moduleParts": {
60
- "index.production.js": "10ed-156"
60
+ "index.production.js": "7238-156"
61
61
  },
62
62
  "imported": [],
63
63
  "importedBy": [
64
64
  {
65
- "uid": "10ed-159"
65
+ "uid": "7238-159"
66
66
  }
67
67
  ]
68
68
  },
69
- "10ed-157": {
69
+ "7238-157": {
70
70
  "id": "/packages/vue-table/src/merge-proxy.ts",
71
71
  "moduleParts": {
72
- "index.production.js": "10ed-158"
72
+ "index.production.js": "7238-158"
73
73
  },
74
74
  "imported": [],
75
75
  "importedBy": [
76
76
  {
77
- "uid": "10ed-159"
77
+ "uid": "7238-159"
78
78
  }
79
79
  ]
80
80
  },
81
- "10ed-159": {
81
+ "7238-159": {
82
82
  "id": "/packages/vue-table/src/index.ts",
83
83
  "moduleParts": {
84
- "index.production.js": "10ed-160"
84
+ "index.production.js": "7238-160"
85
85
  },
86
86
  "imported": [
87
87
  {
88
- "uid": "10ed-155"
88
+ "uid": "7238-155"
89
89
  },
90
90
  {
91
- "uid": "10ed-161"
91
+ "uid": "7238-161"
92
92
  },
93
93
  {
94
- "uid": "10ed-157"
94
+ "uid": "7238-157"
95
95
  }
96
96
  ],
97
97
  "importedBy": [],
98
98
  "isEntry": true
99
99
  },
100
- "10ed-161": {
100
+ "7238-161": {
101
101
  "id": "vue",
102
102
  "moduleParts": {},
103
103
  "imported": [],
104
104
  "importedBy": [
105
105
  {
106
- "uid": "10ed-159"
106
+ "uid": "7238-159"
107
107
  }
108
108
  ],
109
109
  "isExternal": true
@@ -969,6 +969,7 @@
969
969
  onColumnFiltersChange: makeStateUpdater('columnFilters', table),
970
970
  onGlobalFilterChange: makeStateUpdater('globalFilter', table),
971
971
  filterFromLeafRows: false,
972
+ maxLeafRowFilterDepth: 100,
972
973
  globalFilterFn: 'auto',
973
974
  getColumnCanGlobalFilter: column => {
974
975
  var _table$getCoreRowMode, _table$getCoreRowMode2;
@@ -2849,7 +2850,11 @@
2849
2850
  function filterRowModelFromLeafs(rowsToFilter, filterRow, table) {
2850
2851
  const newFilteredFlatRows = [];
2851
2852
  const newFilteredRowsById = {};
2853
+ const maxDepth = table.options.maxLeafRowFilterDepth ?? 100;
2852
2854
  const recurseFilterRows = function (rowsToFilter, depth) {
2855
+ if (depth === void 0) {
2856
+ depth = 0;
2857
+ }
2853
2858
  const rows = [];
2854
2859
 
2855
2860
  // Filter from children up first
@@ -2858,8 +2863,8 @@
2858
2863
  let row = rowsToFilter[i];
2859
2864
  const newRow = createRow(table, row.id, row.original, row.index, row.depth);
2860
2865
  newRow.columnFilters = row.columnFilters;
2861
- if ((_row$subRows = row.subRows) != null && _row$subRows.length) {
2862
- newRow.subRows = recurseFilterRows(row.subRows);
2866
+ if ((_row$subRows = row.subRows) != null && _row$subRows.length && depth < maxDepth) {
2867
+ newRow.subRows = recurseFilterRows(row.subRows, depth + 1);
2863
2868
  row = newRow;
2864
2869
  if (filterRow(row) && !newRow.subRows.length) {
2865
2870
  rows.push(row);
@@ -2893,9 +2898,13 @@
2893
2898
  function filterRowModelFromRoot(rowsToFilter, filterRow, table) {
2894
2899
  const newFilteredFlatRows = [];
2895
2900
  const newFilteredRowsById = {};
2901
+ const maxDepth = table.options.maxLeafRowFilterDepth ?? 100;
2896
2902
 
2897
2903
  // Filters top level and nested rows
2898
2904
  const recurseFilterRows = function (rowsToFilter, depth) {
2905
+ if (depth === void 0) {
2906
+ depth = 0;
2907
+ }
2899
2908
  // Filter from parents downward first
2900
2909
 
2901
2910
  const rows = [];
@@ -2906,9 +2915,9 @@
2906
2915
  const pass = filterRow(row);
2907
2916
  if (pass) {
2908
2917
  var _row$subRows2;
2909
- if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
2918
+ if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length && depth < maxDepth) {
2910
2919
  const newRow = createRow(table, row.id, row.original, row.index, row.depth);
2911
- newRow.subRows = recurseFilterRows(row.subRows);
2920
+ newRow.subRows = recurseFilterRows(row.subRows, depth + 1);
2912
2921
  row = newRow;
2913
2922
  }
2914
2923
  rows.push(row);