From b1bc4e704ea3054ab7cef972a870401601767ce3 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Wed, 17 Aug 2022 19:15:32 -0700 Subject: [PATCH] feat(toolbar-search): add `filteredRowIds` prop Closes #1393 --- src/DataTable/ToolbarSearch.svelte | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/DataTable/ToolbarSearch.svelte b/src/DataTable/ToolbarSearch.svelte index 30e53a44..f0064883 100644 --- a/src/DataTable/ToolbarSearch.svelte +++ b/src/DataTable/ToolbarSearch.svelte @@ -28,6 +28,12 @@ */ export let shouldFilterRows = false; + /** + * The filtered row ids + * @type {ReadonlyArray} + */ + 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() {