@etsoo/react 1.7.28 → 1.7.29
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.
|
@@ -57,7 +57,7 @@ export type GridLoadDataProps = {
|
|
|
57
57
|
/**
|
|
58
58
|
* Grid data loader
|
|
59
59
|
*/
|
|
60
|
-
export
|
|
60
|
+
export interface GridLoader<T extends object> {
|
|
61
61
|
/**
|
|
62
62
|
* Auto load data, otherwise call reset
|
|
63
63
|
* @default true
|
|
@@ -91,7 +91,7 @@ export type GridLoader<T extends object> = {
|
|
|
91
91
|
* Threshold at which to pre-fetch data; default is half of loadBatchSize
|
|
92
92
|
*/
|
|
93
93
|
threshold?: number | undefined;
|
|
94
|
-
}
|
|
94
|
+
}
|
|
95
95
|
/**
|
|
96
96
|
* Grid loader states
|
|
97
97
|
*/
|
|
@@ -21,7 +21,7 @@ export type ScrollerGridItemRendererProps<T> = Omit<GridChildComponentProps<T>,
|
|
|
21
21
|
/**
|
|
22
22
|
* Scroller vertical grid props
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export interface ScrollerGridProps<T extends object, D extends DataTypes.Keys<T>> extends GridLoader<T>, Omit<VariableSizeGridProps<T>, 'children' | 'rowCount' | 'rowHeight' | 'ref'> {
|
|
25
25
|
/**
|
|
26
26
|
* Default order by asc
|
|
27
27
|
* @default true
|
|
@@ -55,7 +55,7 @@ export type ScrollerGridProps<T extends object, D extends DataTypes.Keys<T>> = G
|
|
|
55
55
|
* Returns the height of the specified row.
|
|
56
56
|
*/
|
|
57
57
|
rowHeight?: ((index: number) => number) | number;
|
|
58
|
-
}
|
|
58
|
+
}
|
|
59
59
|
/**
|
|
60
60
|
* Scroller grid forward ref
|
|
61
61
|
*/
|
package/package.json
CHANGED
|
@@ -95,7 +95,7 @@ export type GridLoadDataProps = {
|
|
|
95
95
|
/**
|
|
96
96
|
* Grid data loader
|
|
97
97
|
*/
|
|
98
|
-
export
|
|
98
|
+
export interface GridLoader<T extends object> {
|
|
99
99
|
/**
|
|
100
100
|
* Auto load data, otherwise call reset
|
|
101
101
|
* @default true
|
|
@@ -137,7 +137,7 @@ export type GridLoader<T extends object> = {
|
|
|
137
137
|
* Threshold at which to pre-fetch data; default is half of loadBatchSize
|
|
138
138
|
*/
|
|
139
139
|
threshold?: number | undefined;
|
|
140
|
-
}
|
|
140
|
+
}
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* Grid loader states
|
|
@@ -39,60 +39,60 @@ export type ScrollerGridItemRendererProps<T> = Omit<
|
|
|
39
39
|
/**
|
|
40
40
|
* Scroller vertical grid props
|
|
41
41
|
*/
|
|
42
|
-
export
|
|
42
|
+
export interface ScrollerGridProps<
|
|
43
43
|
T extends object,
|
|
44
44
|
D extends DataTypes.Keys<T>
|
|
45
|
-
>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
45
|
+
> extends GridLoader<T>,
|
|
46
|
+
Omit<
|
|
47
|
+
VariableSizeGridProps<T>,
|
|
48
|
+
'children' | 'rowCount' | 'rowHeight' | 'ref'
|
|
49
|
+
> {
|
|
50
|
+
/**
|
|
51
|
+
* Default order by asc
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
defaultOrderByAsc?: boolean;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Footer renderer
|
|
58
|
+
*/
|
|
59
|
+
footerRenderer?: (
|
|
60
|
+
rows: T[],
|
|
61
|
+
states: GridLoaderStates<T>
|
|
62
|
+
) => React.ReactNode;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Header renderer
|
|
66
|
+
*/
|
|
67
|
+
headerRenderer?: (states: GridLoaderStates<T>) => React.ReactNode;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Id field
|
|
71
|
+
*/
|
|
72
|
+
idField?: D;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Item renderer
|
|
76
|
+
*/
|
|
77
|
+
itemRenderer: (
|
|
78
|
+
props: ScrollerGridItemRendererProps<T>
|
|
79
|
+
) => React.ReactElement;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Methods
|
|
83
|
+
*/
|
|
84
|
+
mRef?: React.Ref<ScrollerGridForwardRef<T>>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* On items select change
|
|
88
|
+
*/
|
|
89
|
+
onSelectChange?: (selectedItems: T[]) => void;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Returns the height of the specified row.
|
|
93
|
+
*/
|
|
94
|
+
rowHeight?: ((index: number) => number) | number;
|
|
95
|
+
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* Scroller grid forward ref
|