dhx-react-suite 1.0.5 → 1.0.6
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/index.d.ts
CHANGED
|
@@ -185,22 +185,37 @@ export declare interface FormProps {
|
|
|
185
185
|
style?: React.CSSProperties;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
export declare function Grid({ columns, data, height, rowHeight, sortable, resizable, selection, multiselect, onSelect, style }: GridProps): JSX_2.Element;
|
|
188
|
+
export declare function Grid({ columns, data, height, rowHeight, sortable, resizable, editable, stripe, autoWidth, keyNavigation, selection, multiselect, onSelect, onChange, style, }: GridProps): JSX_2.Element;
|
|
189
189
|
|
|
190
190
|
export declare interface GridColumn {
|
|
191
191
|
id: string;
|
|
192
192
|
header?: {
|
|
193
193
|
text: string;
|
|
194
|
+
align?: "left" | "center" | "right";
|
|
194
195
|
}[] | string;
|
|
196
|
+
footer?: GridColumnFooter[];
|
|
195
197
|
width?: number;
|
|
196
198
|
minWidth?: number;
|
|
197
199
|
sortable?: boolean;
|
|
198
200
|
filterable?: boolean;
|
|
201
|
+
filterType?: "input" | "select";
|
|
199
202
|
resizable?: boolean;
|
|
203
|
+
editable?: boolean;
|
|
200
204
|
align?: "left" | "center" | "right";
|
|
201
205
|
template?: (value: unknown, row: Record<string, unknown>) => React.ReactNode;
|
|
202
206
|
}
|
|
203
207
|
|
|
208
|
+
declare interface GridColumnFooter {
|
|
209
|
+
text?: string | ((s: {
|
|
210
|
+
sum: number;
|
|
211
|
+
avg: number;
|
|
212
|
+
count: number;
|
|
213
|
+
min: number;
|
|
214
|
+
max: number;
|
|
215
|
+
}) => string);
|
|
216
|
+
summary?: "sum" | "avg" | "count" | "min" | "max";
|
|
217
|
+
}
|
|
218
|
+
|
|
204
219
|
export declare interface GridProps {
|
|
205
220
|
columns: GridColumn[];
|
|
206
221
|
data?: Record<string, unknown>[];
|
|
@@ -208,9 +223,14 @@ export declare interface GridProps {
|
|
|
208
223
|
rowHeight?: number;
|
|
209
224
|
sortable?: boolean;
|
|
210
225
|
resizable?: boolean;
|
|
226
|
+
editable?: boolean;
|
|
227
|
+
stripe?: boolean;
|
|
228
|
+
autoWidth?: boolean;
|
|
229
|
+
keyNavigation?: boolean;
|
|
211
230
|
selection?: "row" | "cell";
|
|
212
231
|
multiselect?: boolean;
|
|
213
232
|
onSelect?: (row: Record<string, unknown>) => void;
|
|
233
|
+
onChange?: (row: Record<string, unknown>, colId: string, value: unknown) => void;
|
|
214
234
|
style?: React.CSSProperties;
|
|
215
235
|
}
|
|
216
236
|
|