@etsoo/materialui 1.4.38 → 1.4.39
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/lib/DataGridEx.js +3 -1
- package/lib/MUUtils.d.ts +1 -1
- package/lib/MUUtils.js +1 -0
- package/lib/TableEx.js +1 -0
- package/package.json +2 -2
- package/src/DataGridEx.tsx +3 -1
- package/src/MUUtils.ts +2 -0
- package/src/TableEx.tsx +1 -0
package/lib/DataGridEx.js
CHANGED
|
@@ -165,7 +165,9 @@ export function DataGridEx(props) {
|
|
|
165
165
|
});
|
|
166
166
|
// New sort
|
|
167
167
|
const handleSort = (field, asc) => {
|
|
168
|
-
reset({
|
|
168
|
+
reset({
|
|
169
|
+
queryPaging: { orderBy: [{ field, desc: !(asc ?? true) }] }
|
|
170
|
+
});
|
|
169
171
|
};
|
|
170
172
|
// Reset
|
|
171
173
|
const reset = (add) => {
|
package/lib/MUUtils.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ export declare namespace MUUtils {
|
|
|
18
18
|
* @param lastItem Last item of the query
|
|
19
19
|
* @param idField Id field
|
|
20
20
|
*/
|
|
21
|
-
function setupPagingKeysets<T, K extends IdType = number>(data: QueryRQ<K>, lastItem: T | undefined, idField: keyof T & string):
|
|
21
|
+
function setupPagingKeysets<T, K extends IdType = number>(data: QueryRQ<K>, lastItem: T | undefined, idField: keyof T & string): QueryRQ<K>;
|
|
22
22
|
}
|
package/lib/MUUtils.js
CHANGED
package/lib/TableEx.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.39",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@emotion/styled": "^11.13.5",
|
|
38
38
|
"@etsoo/appscript": "^1.5.78",
|
|
39
39
|
"@etsoo/notificationbase": "^1.1.54",
|
|
40
|
-
"@etsoo/react": "^1.8.
|
|
40
|
+
"@etsoo/react": "^1.8.8",
|
|
41
41
|
"@etsoo/shared": "^1.2.55",
|
|
42
42
|
"@mui/icons-material": "^6.1.9",
|
|
43
43
|
"@mui/material": "^6.1.9",
|
package/src/DataGridEx.tsx
CHANGED
|
@@ -440,7 +440,9 @@ export function DataGridEx<T extends object>(props: DataGridExProps<T>) {
|
|
|
440
440
|
|
|
441
441
|
// New sort
|
|
442
442
|
const handleSort = (field: string, asc?: boolean) => {
|
|
443
|
-
reset({
|
|
443
|
+
reset({
|
|
444
|
+
queryPaging: { orderBy: [{ field, desc: !(asc ?? true) }] }
|
|
445
|
+
});
|
|
444
446
|
};
|
|
445
447
|
|
|
446
448
|
// Reset
|
package/src/MUUtils.ts
CHANGED