@isoftdata/svelte-table 2.10.5 → 2.11.0

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/dist/Table.svelte CHANGED
@@ -458,13 +458,17 @@
458
458
  paginationComponent?.setPageVisibleByItemIndex(index)
459
459
  }
460
460
  }
461
+ /**
462
+ * Sorts the rows in the table. `rows` should be pre-filtered, and defaults to `filteredRows` if omitted
463
+ */
461
464
  export function doSort({
462
- rows,
465
+ rows = filteredRows,
463
466
  sortColumn,
464
467
  sortDirection,
465
468
  sameSortOrder,
466
469
  }: {
467
- rows: Array<IndexedRow>
470
+ /** Defaults to `filteredRows` if omitted */
471
+ rows?: Array<IndexedRow>
468
472
  sortColumn: Column | undefined
469
473
  sortDirection: SortDirection
470
474
  sameSortOrder: boolean
@@ -196,10 +196,11 @@ declare class __sveltets_Render<R extends UuidRowProps> {
196
196
  keyName: keyof R;
197
197
  }) => void;
198
198
  doSort: ({ rows, sortColumn, sortDirection, sameSortOrder, }: {
199
- rows: (R & {
199
+ /** Defaults to `filteredRows` if omitted */
200
+ rows?: (R & {
200
201
  originalIndex: number;
201
202
  uuid: string;
202
- })[];
203
+ })[] | undefined;
203
204
  sortColumn: GenericColumn<R & {}> | undefined;
204
205
  sortDirection: SortDirection;
205
206
  sameSortOrder: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoftdata/svelte-table",
3
- "version": "2.10.5",
3
+ "version": "2.11.0",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",