reykit 1.0.233 → 1.0.235
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 +2288 -2286
- package/dist/src/component/Table.d.ts +21 -4
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ export type TableButtonOption = {
|
|
|
20
20
|
export type TableRowOptionItemLink = string;
|
|
21
21
|
export type TableRowOptionItem<Row extends Record<string, any>> = {
|
|
22
22
|
name: ReactNode;
|
|
23
|
-
|
|
23
|
+
method: ((row: Row) => void) | TableRowOptionItemLink | null;
|
|
24
24
|
};
|
|
25
25
|
export type TableRowOption<Row extends Record<string, any>> = {
|
|
26
26
|
options?: TableRowOptionItem<Row>[];
|
|
@@ -31,7 +31,7 @@ export type TableRowOption<Row extends Record<string, any>> = {
|
|
|
31
31
|
});
|
|
32
32
|
export type TableSelectRowsOptionItem<Row extends Record<string, any>> = {
|
|
33
33
|
name: ReactNode;
|
|
34
|
-
|
|
34
|
+
method: ((selectRows: Row[]) => void) | null;
|
|
35
35
|
};
|
|
36
36
|
export type TableSelectRowsOption<Row extends Record<string, any>> = {
|
|
37
37
|
options?: TableSelectRowsOptionItem<Row>[];
|
|
@@ -44,17 +44,34 @@ export type TableSelectRowsOption<Row extends Record<string, any>> = {
|
|
|
44
44
|
* Table component.
|
|
45
45
|
*
|
|
46
46
|
* @param data - Table data state value.
|
|
47
|
+
* - `Array` : Convert elements to `Badge` component.
|
|
47
48
|
* @param setData - Function of set table data state value.
|
|
48
49
|
* @param fieldOption - Header option.
|
|
50
|
+
* - `Attribute key` : Field key.
|
|
51
|
+
* - `Attribute name` : Field show name.
|
|
52
|
+
* - `Attribute isHide` : Whether hide field.
|
|
53
|
+
* - `Attribute isSort` : Whether show sort button.
|
|
54
|
+
* - `Attribute isGroup` : Whether show group button.
|
|
55
|
+
* - `Attribute isGroupSearch` : Whether show search input in group button.
|
|
56
|
+
* - `Attribute sortMethod` : Sort method.
|
|
57
|
+
* - `Attribute defaultValue` : Replace none value.
|
|
49
58
|
* @param searchOption - Search option.
|
|
59
|
+
* - `Attribute method` : Search method.
|
|
60
|
+
* - `Attribute placeholder` : Search input placeholder.
|
|
50
61
|
* @param buttonOption - Custom buttons option.
|
|
51
|
-
*
|
|
62
|
+
* - `Attribute name` : Button name.
|
|
63
|
+
* - `Attribute method` : Execute method.
|
|
64
|
+
* @param rowOption - Each row buttons option.
|
|
65
|
+
* - `Attribute options` : Normal buttons option.
|
|
66
|
+
* - `Attribute destructiveOptions` : Important buttons option.
|
|
52
67
|
* @param selectRowsOption - Selected rows option.
|
|
68
|
+
* - `Attribute options` : Normal buttons option.
|
|
69
|
+
* - `Attribute destructiveOptions` : Important buttons option.
|
|
53
70
|
* @param pageSize - Page rows size.
|
|
54
71
|
* @param mobilePageSize - Page rows size on mobile devices.
|
|
55
72
|
* @param language - Language type.
|
|
56
73
|
*/
|
|
57
|
-
export declare function Table<Row extends Record<string,
|
|
74
|
+
export declare function Table<Row extends Record<string, ReactNode>>({ data, setData, fieldOption, searchOption, buttonOption, rowOption, selectRowsOption, pageSize, mobilePageSize, language }: {
|
|
58
75
|
data: Row[];
|
|
59
76
|
setData: (value: Row[] | ((value: Row[]) => Row[])) => void;
|
|
60
77
|
fieldOption?: TableFieldOption<Row>;
|