feat(toolbar-search): add filteredRowIds prop to support pagination (#1454)

Closes #1393

* feat(toolbar-search): add `filteredRowIds` prop

* Run "yarn build:docs"

* test(data-table): assert `filteredRowIds` prop

* docs(data-table): add pagination to default filterable examples
This commit is contained in:
metonym 2022-08-18 06:59:14 -07:00 committed by GitHub
commit dbe33d5cbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 69 additions and 30 deletions

View file

@ -28,6 +28,12 @@
*/
export let shouldFilterRows = false;
/**
* The filtered row ids
* @type {ReadonlyArray<import("./DataTable.svelte").DataTableRowId>}
*/
export let filteredRowIds = [];
/** Specify the tabindex */
export let tabindex = "0";
@ -65,6 +71,7 @@
}
tableRows.set(rows);
filteredRowIds = rows.map((row) => row.id);
}
async function expandSearch() {