@tsed/react-formio 2.2.0 → 2.2.1
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/dist/components/table/hooks/useCustomTable.hook.d.ts +5 -0
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +5 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -3
- package/src/components/table/hooks/useCustomTable.hook.tsx +6 -0
- package/src/components/table/table.component.tsx +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/react-formio",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Provide a react formio wrapper. Written in TypeScript.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.modern.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"tooltip.js": ">=1.3.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@tsed/tailwind": "2.2.
|
|
35
|
-
"@tsed/tailwind-formio": "2.2.
|
|
34
|
+
"@tsed/tailwind": "2.2.1",
|
|
35
|
+
"@tsed/tailwind-formio": "2.2.1"
|
|
36
36
|
},
|
|
37
37
|
"repository": "https://github.com/TypedProject/tsed-formio",
|
|
38
38
|
"bugs": {
|
|
@@ -25,6 +25,10 @@ export interface TableProps<Data extends object = any> extends TableOptions<Data
|
|
|
25
25
|
* Pagination steps list
|
|
26
26
|
*/
|
|
27
27
|
pageSizes?: number[];
|
|
28
|
+
/**
|
|
29
|
+
* Total length of the data
|
|
30
|
+
*/
|
|
31
|
+
totalLength?: number;
|
|
28
32
|
/**
|
|
29
33
|
*
|
|
30
34
|
*/
|
|
@@ -126,6 +130,7 @@ export function useCustomTable<Data extends object = {}>(props: PropsWithChildre
|
|
|
126
130
|
filterId: controlledFilterId,
|
|
127
131
|
pageSize: controlledPageSize,
|
|
128
132
|
pageIndex: controlledPageIndex,
|
|
133
|
+
totalLength,
|
|
129
134
|
sortBy: controlledSortBy,
|
|
130
135
|
isLoading,
|
|
131
136
|
disableFilters,
|
|
@@ -225,6 +230,7 @@ export function useCustomTable<Data extends object = {}>(props: PropsWithChildre
|
|
|
225
230
|
pageIndex,
|
|
226
231
|
pageSize,
|
|
227
232
|
pageSizes,
|
|
233
|
+
totalLength,
|
|
228
234
|
setPageSize,
|
|
229
235
|
i18n,
|
|
230
236
|
children,
|
|
@@ -20,6 +20,7 @@ export function Table<Data extends object = any>(props: PropsWithChildren<TableP
|
|
|
20
20
|
pageSize,
|
|
21
21
|
pageSizes,
|
|
22
22
|
setPageSize,
|
|
23
|
+
totalLength,
|
|
23
24
|
i18n,
|
|
24
25
|
enableDragNDrop,
|
|
25
26
|
children,
|
|
@@ -81,6 +82,7 @@ export function Table<Data extends object = any>(props: PropsWithChildren<TableP
|
|
|
81
82
|
<div className={"overflow-hidden"}>
|
|
82
83
|
<Pagination
|
|
83
84
|
{...tableInstance}
|
|
85
|
+
totalLength={totalLength}
|
|
84
86
|
className={"text-sm"}
|
|
85
87
|
pageIndex={pageIndex}
|
|
86
88
|
pageSize={pageSize}
|