wca-designsystem 1.0.19 → 1.0.20
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/package.json
CHANGED
|
@@ -41,6 +41,8 @@ export type CustomTableProps<
|
|
|
41
41
|
setGlobalFilter: React.Dispatch<React.SetStateAction<string>>;
|
|
42
42
|
globalFilter: string;
|
|
43
43
|
setPagination: React.Dispatch<any>;
|
|
44
|
+
selectedLine?: T | null;
|
|
45
|
+
setSelectedLine?: React.Dispatch<React.SetStateAction<T | null>>;
|
|
44
46
|
handleAdicionar?: () => void;
|
|
45
47
|
hasFiltersButtons?: boolean;
|
|
46
48
|
setOrdenarPor?: React.Dispatch<React.SetStateAction<SelectDataProps>>;
|
|
@@ -70,34 +72,36 @@ const Tabela = <
|
|
|
70
72
|
T extends { id: string | number; children?: Array<T>; disabled?: boolean }
|
|
71
73
|
>({
|
|
72
74
|
data,
|
|
73
|
-
columns,
|
|
74
|
-
setPagination,
|
|
75
|
-
qtdRegistrosPagina,
|
|
76
|
-
ordenarPor,
|
|
77
|
-
acoesChildren,
|
|
78
75
|
color,
|
|
79
|
-
rowSelection,
|
|
80
|
-
tdMinWidth = '260px',
|
|
81
|
-
setRowSelection,
|
|
82
|
-
hasFiltersButtons,
|
|
83
|
-
isLoading,
|
|
84
76
|
hasAdd,
|
|
77
|
+
columns,
|
|
78
|
+
hasOrder,
|
|
79
|
+
isLoading,
|
|
85
80
|
hasSelect,
|
|
86
|
-
globalFilter,
|
|
87
81
|
hasExpand,
|
|
82
|
+
ordenarPor,
|
|
83
|
+
setSimples,
|
|
84
|
+
selectedLine,
|
|
85
|
+
globalFilter,
|
|
86
|
+
rowSelection,
|
|
87
|
+
fixedPosition,
|
|
88
|
+
setPagination,
|
|
89
|
+
acoesChildren,
|
|
88
90
|
setFiltrosPor,
|
|
89
|
-
setGlobalFilter,
|
|
90
|
-
hasOrder,
|
|
91
|
-
headerSelection,
|
|
92
91
|
fetchMoreData,
|
|
93
92
|
setOrdenarPor,
|
|
94
|
-
|
|
93
|
+
setGlobalFilter,
|
|
95
94
|
handleAdicionar,
|
|
95
|
+
setRowSelection,
|
|
96
|
+
headerSelection,
|
|
96
97
|
tabelaPaginacao,
|
|
97
|
-
|
|
98
|
-
tamanhoPaginacao,
|
|
99
|
-
fixedPosition,
|
|
98
|
+
setSelectedLine,
|
|
100
99
|
hasInfinitScrool,
|
|
100
|
+
tamanhoPaginacao,
|
|
101
|
+
hasFiltersButtons,
|
|
102
|
+
qtdRegistrosPagina,
|
|
103
|
+
quantidadeRegistros,
|
|
104
|
+
tdMinWidth = '260px',
|
|
101
105
|
}: CustomTableProps<T>) => {
|
|
102
106
|
const [toogleFiltros, setToogleFiltros] = useState(false);
|
|
103
107
|
const [formatedColumns, setFormatedColumns] = useState(
|
|
@@ -197,6 +201,8 @@ const Tabela = <
|
|
|
197
201
|
hasMoreData={quantidadeRegistros !== data.length}
|
|
198
202
|
rowSelection={rowSelection}
|
|
199
203
|
setRowSelection={setRowSelection}
|
|
204
|
+
selectedLine={selectedLine}
|
|
205
|
+
setSelectedLine={setSelectedLine}
|
|
200
206
|
acoesChildren={acoesChildren}
|
|
201
207
|
data={data}
|
|
202
208
|
columns={columnsToShow}
|