@tanstack/table-core 8.5.25 → 8.5.27
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.
- package/build/cjs/filterFns.js +2 -2
- package/build/cjs/filterFns.js.map +1 -1
- package/build/cjs/utils/getSortedRowModel.js +3 -3
- package/build/cjs/utils/getSortedRowModel.js.map +1 -1
- package/build/esm/index.js +5 -5
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +314 -314
- package/build/umd/index.development.js +5 -5
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/filterFns.ts +2 -2
- package/src/utils/getSortedRowModel.ts +2 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/table-core",
|
|
3
3
|
"author": "Tanner Linsley",
|
|
4
|
-
"version": "8.5.
|
|
4
|
+
"version": "8.5.27",
|
|
5
5
|
"description": "Headless UI for building powerful tables & datagrids for TS/JS.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/tanstack/table#readme",
|
package/src/filterFns.ts
CHANGED
|
@@ -6,7 +6,7 @@ const includesString: FilterFn<any> = (
|
|
|
6
6
|
filterValue: string
|
|
7
7
|
) => {
|
|
8
8
|
const search = filterValue.toLowerCase()
|
|
9
|
-
return row.getValue<string>(columnId)?.toLowerCase().includes(search)
|
|
9
|
+
return Boolean(row.getValue<string>(columnId)?.toLowerCase().includes(search))
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
includesString.autoRemove = (val: any) => testFalsey(val)
|
|
@@ -16,7 +16,7 @@ const includesStringSensitive: FilterFn<any> = (
|
|
|
16
16
|
columnId: string,
|
|
17
17
|
filterValue: string
|
|
18
18
|
) => {
|
|
19
|
-
return row.getValue<string>(columnId)?.includes(filterValue)
|
|
19
|
+
return Boolean(row.getValue<string>(columnId)?.includes(filterValue))
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
includesStringSensitive.autoRemove = (val: any) => testFalsey(val)
|
|
@@ -90,10 +90,9 @@ export function getSortedRowModel<TData extends RowData>(): (
|
|
|
90
90
|
// If there are sub-rows, sort them
|
|
91
91
|
sortedData.forEach(row => {
|
|
92
92
|
sortedFlatRows.push(row)
|
|
93
|
-
if (
|
|
94
|
-
|
|
93
|
+
if (row.subRows?.length) {
|
|
94
|
+
row.subRows = sortData(row.subRows);
|
|
95
95
|
}
|
|
96
|
-
row.subRows = sortData(row.subRows)
|
|
97
96
|
})
|
|
98
97
|
|
|
99
98
|
return sortedData
|