blob: 6acea01d57eb141212102038d26569e1ee1ff989 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import * as React from 'react';
export enum ColumnType {
text,
numeric,
custom
}
type CustomControl<TData> = {
rowData: TData
}
export type ColumnModel<TData> = {
title?: string;
disablePadding?: boolean;
width?: string | number;
disableSorting?: boolean;
disableFilter?: boolean;
} & ({
property: string;
type: ColumnType.custom;
customControl: React.ComponentType<CustomControl<TData>>;
} | {
property: keyof TData;
type?: ColumnType.numeric | ColumnType.text;
});
|