@bluemarble/bm-components 0.0.72 → 0.0.74

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.
@@ -6,7 +6,7 @@ interface UseGridProps {
6
6
  rowsPerPageOptions?: number[];
7
7
  }
8
8
  export declare function useGrid<T extends Record<string, any>>({ columns, filters, rowsPerPageOptions }: UseGridProps): {
9
- data: any[];
9
+ data: T[];
10
10
  set: (data: T[]) => void;
11
11
  onSortBy: (prop: string) => void;
12
12
  sortedBy: string;
@@ -19,5 +19,6 @@ export declare function useGrid<T extends Record<string, any>>({ columns, filter
19
19
  setRowsPerPage: (rows: number) => void;
20
20
  rowsPerPageOptions: number[];
21
21
  rowsPerPage: number;
22
+ setSort: (prop: string, direction: 'desc' | 'asc') => void;
22
23
  };
23
24
  export {};
package/dist/index.d.ts CHANGED
@@ -248,7 +248,7 @@ interface UseGridProps {
248
248
  rowsPerPageOptions?: number[];
249
249
  }
250
250
  declare function useGrid<T extends Record<string, any>>({ columns, filters, rowsPerPageOptions }: UseGridProps): {
251
- data: any[];
251
+ data: T[];
252
252
  set: (data: T[]) => void;
253
253
  onSortBy: (prop: string) => void;
254
254
  sortedBy: string;
@@ -261,6 +261,7 @@ declare function useGrid<T extends Record<string, any>>({ columns, filters, rows
261
261
  setRowsPerPage: (rows: number) => void;
262
262
  rowsPerPageOptions: number[];
263
263
  rowsPerPage: number;
264
+ setSort: (prop: string, direction: 'desc' | 'asc') => void;
264
265
  };
265
266
 
266
267
  declare function useEvent(event: keyof WindowEventMap, handler: (ev: any) => void, passive?: boolean): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluemarble/bm-components",
3
- "version": "0.0.72",
3
+ "version": "0.0.74",
4
4
  "description": "BM components",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",