wca-designsystem 1.0.34 → 1.0.35

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
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.34",
2
+ "version": "1.0.35",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -11,6 +11,7 @@ export interface BodyTableProps<
11
11
  > {
12
12
  data: Array<T>;
13
13
  columns: Column<T>[];
14
+ selectAllChecked?: boolean;
14
15
  fixedPosition?: string[] | undefined;
15
16
  color?: string;
16
17
  acoesChildren?: (row: T) => JSX.Element;
@@ -33,7 +34,7 @@ function BodyTable<
33
34
  rowSelection,
34
35
  selectedLine,
35
36
  setSelectedLine,
36
-
37
+ selectAllChecked,
37
38
  setRowSelection,
38
39
  color,
39
40
  } = props;
@@ -44,6 +45,8 @@ function BodyTable<
44
45
  );
45
46
  const handleRowSelect = useCallback(
46
47
  (item: T, checked: boolean) => {
48
+ if (selectAllChecked) return;
49
+
47
50
  if (checked) {
48
51
  setRowSelection!(
49
52
  rowSelection?.filter(rowSelect => rowSelect.id !== item.id) ?? []
@@ -210,6 +210,7 @@ const Tabela = <
210
210
  color={color}
211
211
  hasSelect={hasSelect}
212
212
  rowSelection={rowSelection}
213
+ selectAllChecked={selectAllChecked}
213
214
  setRowSelection={setRowSelection}
214
215
  selectedLine={selectedLine}
215
216
  setSelectedLine={setSelectedLine}