@tanstack/table-core 8.11.2 → 8.11.3

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.
Files changed (85) hide show
  1. package/LICENSE +21 -0
  2. package/build/lib/aggregationFns.js +9 -11
  3. package/build/lib/aggregationFns.js.map +1 -1
  4. package/build/lib/columnHelper.js +9 -11
  5. package/build/lib/columnHelper.js.map +1 -1
  6. package/build/lib/core/cell.js +9 -11
  7. package/build/lib/core/cell.js.map +1 -1
  8. package/build/lib/core/column.js +9 -11
  9. package/build/lib/core/column.js.map +1 -1
  10. package/build/lib/core/headers.js +9 -11
  11. package/build/lib/core/headers.js.map +1 -1
  12. package/build/lib/core/row.js +9 -11
  13. package/build/lib/core/row.js.map +1 -1
  14. package/build/lib/core/table.js +17 -15
  15. package/build/lib/core/table.js.map +1 -1
  16. package/build/lib/features/ColumnSizing.d.ts +1 -1
  17. package/build/lib/features/ColumnSizing.js +9 -11
  18. package/build/lib/features/ColumnSizing.js.map +1 -1
  19. package/build/lib/features/Expanding.js +9 -11
  20. package/build/lib/features/Expanding.js.map +1 -1
  21. package/build/lib/features/Filters.js +9 -11
  22. package/build/lib/features/Filters.js.map +1 -1
  23. package/build/lib/features/Grouping.js +9 -11
  24. package/build/lib/features/Grouping.js.map +1 -1
  25. package/build/lib/features/Ordering.js +9 -11
  26. package/build/lib/features/Ordering.js.map +1 -1
  27. package/build/lib/features/Pagination.js +9 -11
  28. package/build/lib/features/Pagination.js.map +1 -1
  29. package/build/lib/features/Pinning.js +9 -11
  30. package/build/lib/features/Pinning.js.map +1 -1
  31. package/build/lib/features/RowSelection.js +9 -11
  32. package/build/lib/features/RowSelection.js.map +1 -1
  33. package/build/lib/features/Sorting.js +9 -11
  34. package/build/lib/features/Sorting.js.map +1 -1
  35. package/build/lib/features/Visibility.js +9 -11
  36. package/build/lib/features/Visibility.js.map +1 -1
  37. package/build/lib/filterFns.js +9 -11
  38. package/build/lib/filterFns.js.map +1 -1
  39. package/build/lib/index.esm.js +17 -13
  40. package/build/lib/index.esm.js.map +1 -1
  41. package/build/lib/index.js +9 -11
  42. package/build/lib/index.js.map +1 -1
  43. package/build/lib/index.mjs +17 -13
  44. package/build/lib/index.mjs.map +1 -1
  45. package/build/lib/sortingFns.js +9 -11
  46. package/build/lib/sortingFns.js.map +1 -1
  47. package/build/lib/utils/filterRowsUtils.js +9 -11
  48. package/build/lib/utils/filterRowsUtils.js.map +1 -1
  49. package/build/lib/utils/getCoreRowModel.js +9 -11
  50. package/build/lib/utils/getCoreRowModel.js.map +1 -1
  51. package/build/lib/utils/getExpandedRowModel.js +9 -11
  52. package/build/lib/utils/getExpandedRowModel.js.map +1 -1
  53. package/build/lib/utils/getFacetedMinMaxValues.js +9 -11
  54. package/build/lib/utils/getFacetedMinMaxValues.js.map +1 -1
  55. package/build/lib/utils/getFacetedRowModel.js +9 -11
  56. package/build/lib/utils/getFacetedRowModel.js.map +1 -1
  57. package/build/lib/utils/getFacetedUniqueValues.js +9 -11
  58. package/build/lib/utils/getFacetedUniqueValues.js.map +1 -1
  59. package/build/lib/utils/getFilteredRowModel.js +9 -11
  60. package/build/lib/utils/getFilteredRowModel.js.map +1 -1
  61. package/build/lib/utils/getGroupedRowModel.js +9 -11
  62. package/build/lib/utils/getGroupedRowModel.js.map +1 -1
  63. package/build/lib/utils/getPaginationRowModel.js +9 -11
  64. package/build/lib/utils/getPaginationRowModel.js.map +1 -1
  65. package/build/lib/utils/getSortedRowModel.js +9 -11
  66. package/build/lib/utils/getSortedRowModel.js.map +1 -1
  67. package/build/lib/utils.js +9 -11
  68. package/build/lib/utils.js.map +1 -1
  69. package/build/umd/index.development.js +16 -14
  70. package/build/umd/index.development.js.map +1 -1
  71. package/build/umd/index.production.js +10 -10
  72. package/build/umd/index.production.js.map +1 -1
  73. package/package.json +13 -3
  74. package/src/aggregationFns.ts +0 -0
  75. package/src/columnHelper.ts +2 -2
  76. package/src/core/row.ts +2 -1
  77. package/src/core/table.ts +10 -5
  78. package/src/features/ColumnSizing.ts +11 -6
  79. package/src/features/Filters.ts +9 -9
  80. package/src/features/Grouping.ts +7 -5
  81. package/src/features/Sorting.ts +3 -3
  82. package/src/index.ts +0 -0
  83. package/src/types.ts +4 -2
  84. package/src/utils/getSortedRowModel.ts +5 -5
  85. package/src/utils.ts +14 -14
@@ -1,17 +1,15 @@
1
1
  /**
2
- * table-core
3
- *
4
- * Copyright (c) TanStack
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE.md file in the root directory of this source tree.
8
- *
9
- * @license MIT
10
- */
2
+ * table-core
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
11
  'use strict';
12
12
 
13
- Object.defineProperty(exports, '__esModule', { value: true });
14
-
15
13
  var table = require('./core/table.js');
16
14
  var column = require('./core/column.js');
17
15
  var headers = require('./core/headers.js');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,13 +1,13 @@
1
1
  /**
2
- * table-core
3
- *
4
- * Copyright (c) TanStack
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE.md file in the root directory of this source tree.
8
- *
9
- * @license MIT
10
- */
2
+ * table-core
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
11
  // Is this type a tuple?
12
12
 
13
13
  // If this type is a tuple, what indices are allowed?
@@ -2797,13 +2797,17 @@ function createTable(options) {
2797
2797
  getRowModel: () => {
2798
2798
  return table.getPaginationRowModel();
2799
2799
  },
2800
+ //in next version, we should just pass in the row model as the optional 2nd arg
2800
2801
  getRow: (id, searchAll) => {
2801
- const row = (searchAll ? table.getCoreRowModel() : table.getRowModel()).rowsById[id];
2802
+ let row = (searchAll ? table.getPrePaginationRowModel() : table.getRowModel()).rowsById[id];
2802
2803
  if (!row) {
2803
- if (process.env.NODE_ENV !== 'production') {
2804
- throw new Error(`getRow expected an ID, but got ${id}`);
2804
+ row = table.getCoreRowModel().rowsById[id];
2805
+ if (!row) {
2806
+ if (process.env.NODE_ENV !== 'production') {
2807
+ throw new Error(`getRow could not find row with ID: ${id}`);
2808
+ }
2809
+ throw new Error();
2805
2810
  }
2806
- throw new Error();
2807
2811
  }
2808
2812
  return row;
2809
2813
  },