reykit 1.0.187 → 1.0.188
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.js +6487 -6434
- package/dist/src/component/Table.d.ts +5 -4
- package/dist/src/component/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export type
|
|
2
|
+
export type FieldOption<Row extends Record<string, any>> = {
|
|
3
3
|
key: string;
|
|
4
4
|
name: string;
|
|
5
5
|
isHide?: boolean;
|
|
6
6
|
isSort?: boolean;
|
|
7
7
|
isGroup?: boolean;
|
|
8
8
|
sortMethod?: (a: Row, b: Row) => number;
|
|
9
|
+
defaultValue?: any;
|
|
9
10
|
}[];
|
|
10
11
|
export type SearchOption<Row extends Record<string, any>> = {
|
|
11
12
|
method: (value: string, row: Row) => boolean;
|
|
@@ -43,7 +44,7 @@ export type SelectRowsOption<Row extends Record<string, any>> = {
|
|
|
43
44
|
*
|
|
44
45
|
* @param data - Table data state value.
|
|
45
46
|
* @param setData - Function of set table data state value.
|
|
46
|
-
* @param
|
|
47
|
+
* @param fieldOption - Header option.
|
|
47
48
|
* @param searchOption - Search option.
|
|
48
49
|
* @param buttonOption - Custom buttons option.
|
|
49
50
|
* @param rowOption - Each row option.
|
|
@@ -52,10 +53,10 @@ export type SelectRowsOption<Row extends Record<string, any>> = {
|
|
|
52
53
|
* @param mobilePageSize - Page rows size on mobile devices.
|
|
53
54
|
* @param language - Language type.
|
|
54
55
|
*/
|
|
55
|
-
export declare function Table<Row extends Record<string, any>>({ data, setData,
|
|
56
|
+
export declare function Table<Row extends Record<string, any>>({ data, setData, fieldOption, searchOption, buttonOption, rowOption, selectRowsOption, pageSize, mobilePageSize, language }: {
|
|
56
57
|
data: Row[];
|
|
57
58
|
setData: (value: Row[] | ((value: Row[]) => Row[])) => void;
|
|
58
|
-
|
|
59
|
+
fieldOption?: FieldOption<Row>;
|
|
59
60
|
searchOption?: SearchOption<Row>;
|
|
60
61
|
buttonOption?: ButtonOption;
|
|
61
62
|
rowOption?: RowOption<Row>;
|
|
@@ -12,6 +12,6 @@ export { CycleButton } from './Button';
|
|
|
12
12
|
export { Form } from './Form';
|
|
13
13
|
export { Loading, useLoading } from './Loading';
|
|
14
14
|
export { Notice, notice } from './Notice';
|
|
15
|
-
export { type
|
|
15
|
+
export { type FieldOption, type SearchOption, type ButtonOption, type OptionName, type RowOption, type SelectRowsOption, Table } from './Table';
|
|
16
16
|
export { IconText } from './Text';
|
|
17
17
|
export { IconToggle } from './Toggle';
|