From 5aa87b46cf167166eeca70ad79639117d44c68cd Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Fri, 29 Sep 2023 13:15:32 +0200 Subject: [PATCH] fix(search): forward all result set properties to the component Signed-off-by: Camila Belo --- .changeset/smooth-pillows-greet.md | 5 +++++ plugins/search/src/alpha.tsx | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .changeset/smooth-pillows-greet.md diff --git a/.changeset/smooth-pillows-greet.md b/.changeset/smooth-pillows-greet.md new file mode 100644 index 0000000000..d943dde95e --- /dev/null +++ b/.changeset/smooth-pillows-greet.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-search': patch +--- + +Forward all result set properties to item components, like highlights, for example. diff --git a/plugins/search/src/alpha.tsx b/plugins/search/src/alpha.tsx index 2a9a714abd..6d74c85d49 100644 --- a/plugins/search/src/alpha.tsx +++ b/plugins/search/src/alpha.tsx @@ -200,14 +200,16 @@ export const SearchPage = createPageExtension({ {({ results }) => results.map((result, index) => { + const { noTrack } = config; + const { document, ...rest } = result; const SearchResultListItem = getResultItemComponent(result); return ( ); })