@firecms/core 3.0.0-canary.122 → 3.0.0-canary.123
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-canary.
|
|
4
|
+
"version": "3.0.0-canary.123",
|
|
5
5
|
"description": "Awesome Firebase/Firestore-based headless open-source CMS",
|
|
6
6
|
"funding": {
|
|
7
7
|
"url": "https://github.com/sponsors/firecmsco"
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"./package.json": "./package.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@firecms/editor": "^3.0.0-canary.
|
|
50
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
51
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
49
|
+
"@firecms/editor": "^3.0.0-canary.123",
|
|
50
|
+
"@firecms/formex": "^3.0.0-canary.123",
|
|
51
|
+
"@firecms/ui": "^3.0.0-canary.123",
|
|
52
52
|
"@hello-pangea/dnd": "^16.6.0",
|
|
53
53
|
"@radix-ui/react-portal": "^1.1.1",
|
|
54
54
|
"clsx": "^2.1.1",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"dist",
|
|
101
101
|
"src"
|
|
102
102
|
],
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "e1e5cea937b902c939ac7505d91d8209d19a0b09",
|
|
104
104
|
"publishConfig": {
|
|
105
105
|
"access": "public"
|
|
106
106
|
},
|
|
@@ -80,6 +80,18 @@ export function useDataSourceEntityCollectionTableController<M extends Record<st
|
|
|
80
80
|
const [searchString, setSearchString] = React.useState<string | undefined>();
|
|
81
81
|
const [itemCount, setItemCount] = React.useState<number | undefined>(paginationEnabled ? pageSize : undefined);
|
|
82
82
|
|
|
83
|
+
const checkFilterCombination = useCallback((filterValues: FilterValues<any>,
|
|
84
|
+
sortBy?: [string, "asc" | "desc"]) => {
|
|
85
|
+
if (!dataSource.isFilterCombinationValid)
|
|
86
|
+
return true;
|
|
87
|
+
return dataSource.isFilterCombinationValid({
|
|
88
|
+
path: resolvedPath,
|
|
89
|
+
collection,
|
|
90
|
+
filterValues,
|
|
91
|
+
sortBy
|
|
92
|
+
})
|
|
93
|
+
}, []);
|
|
94
|
+
|
|
83
95
|
const initialSortInternal = useMemo(() => {
|
|
84
96
|
if (initialSort && forceFilter && !checkFilterCombination(forceFilter, initialSort)) {
|
|
85
97
|
console.warn("Initial sort is not compatible with the force filter. Ignoring initial sort");
|
|
@@ -108,18 +120,6 @@ export function useDataSourceEntityCollectionTableController<M extends Record<st
|
|
|
108
120
|
const [dataLoadingError, setDataLoadingError] = useState<Error | undefined>();
|
|
109
121
|
const [noMoreToLoad, setNoMoreToLoad] = useState<boolean>(false);
|
|
110
122
|
|
|
111
|
-
const checkFilterCombination = useCallback((filterValues: FilterValues<any>,
|
|
112
|
-
sortBy?: [string, "asc" | "desc"]) => {
|
|
113
|
-
if (!dataSource.isFilterCombinationValid)
|
|
114
|
-
return true;
|
|
115
|
-
return dataSource.isFilterCombinationValid({
|
|
116
|
-
path: resolvedPath,
|
|
117
|
-
collection,
|
|
118
|
-
filterValues,
|
|
119
|
-
sortBy
|
|
120
|
-
})
|
|
121
|
-
}, []);
|
|
122
|
-
|
|
123
123
|
const clearFilter = useCallback(() => setFilterValues(forceFilter ?? undefined), [forceFilter]);
|
|
124
124
|
|
|
125
125
|
const updateFilterValues = useCallback((updatedFilter: FilterValues<Extract<keyof M, string>> | undefined) => {
|