@paygreen/pgui 3.0.13 → 3.0.14

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.
@@ -25,7 +25,10 @@ export interface DataTableProps<TData> {
25
25
  isLoading?: boolean;
26
26
  onFilterChange?: (filters: ColumnFiltersState) => void;
27
27
  onSortingChange?: (sorting: SortingState) => void;
28
- onRowClick?: (row: TData, event: React.MouseEvent) => void;
28
+ rowLink?: {
29
+ to: (row: TData, event: React.MouseEvent) => string | void;
30
+ navigate?: (url: string) => void;
31
+ };
29
32
  paginationButtonProps?: Partial<IconButtonProps>;
30
33
  countLabel?: {
31
34
  singular: string;
@@ -33,7 +36,7 @@ export interface DataTableProps<TData> {
33
36
  };
34
37
  colorPalette?: 'blue' | 'orange';
35
38
  }
36
- declare function DataTable<TData>({ data, columns, pagination, variant, enableFiltering, enableSorting, emptyState, responsive, mobileView, isMobile, isLoading, onFilterChange, onSortingChange, onRowClick, paginationButtonProps, countLabel, colorPalette, }: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
39
+ declare function DataTable<TData>({ data, columns, pagination, variant, enableFiltering, enableSorting, emptyState, responsive, mobileView, isMobile, isLoading, onFilterChange, onSortingChange, rowLink, paginationButtonProps, countLabel, colorPalette, }: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
37
40
  declare namespace DataTable {
38
41
  var displayName: string;
39
42
  }
@@ -1,7 +1,7 @@
1
- /**
2
- * Handle row click events with support for middle click/ctrl+click
3
- */
4
- export declare const useTableRowInteraction: <TData>(onRowClick?: (row: TData, event: React.MouseEvent) => void) => {
1
+ export declare const useTableRowInteraction: <TData>(rowLink?: {
2
+ to: (row: TData, event: React.MouseEvent) => string | void;
3
+ navigate?: (url: string) => void;
4
+ }) => {
5
5
  handleRowInteraction: (row: TData, event: React.MouseEvent) => void;
6
6
  handleClick: (row: TData, e: React.MouseEvent) => void;
7
7
  handleAuxClick: (row: TData, e: React.MouseEvent) => void;