@sikka/hawa 0.42.7-next → 0.42.8-next

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.
@@ -11,6 +11,7 @@ type DataTableProps<DataProps = {}> = {
11
11
  enableGoTo?: boolean;
12
12
  enableSelection?: boolean;
13
13
  enableFiltering?: boolean;
14
+ resetSelection?: boolean;
14
15
  filters?: {
15
16
  accessorKey: string;
16
17
  value: string;
@@ -49,6 +50,6 @@ declare module "@tanstack/table-core" {
49
50
  i18nKey?: string;
50
51
  }
51
52
  }
52
- declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React.JSX.Element;
53
+ declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, resetSelection, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React.JSX.Element;
53
54
 
54
55
  export { DataTable };
@@ -11,6 +11,7 @@ type DataTableProps<DataProps = {}> = {
11
11
  enableGoTo?: boolean;
12
12
  enableSelection?: boolean;
13
13
  enableFiltering?: boolean;
14
+ resetSelection?: boolean;
14
15
  filters?: {
15
16
  accessorKey: string;
16
17
  value: string;
@@ -49,6 +50,6 @@ declare module "@tanstack/table-core" {
49
50
  i18nKey?: string;
50
51
  }
51
52
  }
52
- declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React.JSX.Element;
53
+ declare const DataTable: <DataProps extends {}>({ columns, data, paginationPosition, translateFn, resetSelection, enableHideColumns, enableSelection, enableFiltering, enableSearch, enableGoTo, ...props }: DataTableProps<DataProps>) => React.JSX.Element;
53
54
 
54
55
  export { DataTable };
@@ -1334,6 +1334,7 @@ var DataTable = ({
1334
1334
  data,
1335
1335
  paginationPosition = "bottom",
1336
1336
  translateFn,
1337
+ resetSelection,
1337
1338
  enableHideColumns,
1338
1339
  enableSelection,
1339
1340
  enableFiltering,
@@ -1420,6 +1421,9 @@ var DataTable = ({
1420
1421
  React11.useEffect(() => {
1421
1422
  localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(columnVisibility));
1422
1423
  }, [columnVisibility]);
1424
+ React11.useEffect(() => {
1425
+ setRowSelection({});
1426
+ }, [resetSelection]);
1423
1427
  React11.useEffect(() => {
1424
1428
  setColumnVisibility((prev) => {
1425
1429
  let newColumnVisibility = {};