@espresso-lab/mantine-data-table 1.5.9 → 1.6.1

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.
@@ -38,6 +38,12 @@ interface Action<T extends BaseEntity> {
38
38
  label: string;
39
39
  onClick: (records: T[]) => void;
40
40
  }
41
+ export interface TabOption {
42
+ value: string;
43
+ label: string;
44
+ icon?: React.ReactNode;
45
+ queryParams?: Record<string, string | number | boolean | null>;
46
+ }
41
47
  export interface StepConfig {
42
48
  label: string;
43
49
  description?: string;
@@ -60,6 +66,8 @@ export interface DataTableProps<T extends BaseEntity> {
60
66
  field: string;
61
67
  direction: "asc" | "desc";
62
68
  };
69
+ tabs?: TabOption[];
70
+ defaultTab?: string;
63
71
  }
64
- export declare function DataTableInner<T extends BaseEntity>({ title, queryKey, connectedQueryKeys, apiPath, buttons, fields, selection, pagination, filters, actions, steps, defaultSort, createButtonText, queryParams }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
72
+ export declare function DataTableInner<T extends BaseEntity>({ title, queryKey, connectedQueryKeys, apiPath, buttons, fields, selection, pagination, filters, actions, steps, defaultSort, createButtonText, queryParams, tabs, defaultTab, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
65
73
  export {};
@@ -82,9 +82,7 @@ export declare function getApiHeaders(): Promise<{
82
82
  flat?: boolean | undefined;
83
83
  [Symbol.iterator]?: boolean | undefined;
84
84
  readonly [Symbol.unscopables]?: boolean | undefined;
85
- at?: boolean | undefined;
86
85
  };
87
- at(index: number): [string, string] | undefined;
88
86
  "Content-Type": string;
89
87
  Authorization: string;
90
88
  } | {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export type { BaseEntity } from './Hooks/useApi';
2
2
  export { getApiHeaders, api, useGetOne, useDeleteOne, useGetAll, useUpdateOne, deleteOne, createOne, getAll, updateOne, useAddOne, getOne, } from './Hooks/useApi';
3
- export type { DataTableProps, FieldType, Field, StepConfig, } from './DataTable/DataTableInner.tsx';
3
+ export type { DataTableProps, FieldType, Field, StepConfig, TabOption, } from './DataTable/DataTableInner.tsx';
4
4
  export { DataTable } from './DataTable/DataTable.tsx';
5
5
  export { usePersistentState } from './Hooks/usePersitentState.ts';
6
6
  export { useDataTable } from './Hooks/useDataTable.ts';