From d14391dfb6d027d683f2c3c84017050d1a369f9e Mon Sep 17 00:00:00 2001 From: cefeng06 Date: Wed, 10 Apr 2024 10:42:32 +0800 Subject: [PATCH] fix(app): preview grounding with filter --- packages/components/src/Annotator/preview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/src/Annotator/preview.tsx b/packages/components/src/Annotator/preview.tsx index 4a95575..9afc7ce 100755 --- a/packages/components/src/Annotator/preview.tsx +++ b/packages/components/src/Annotator/preview.tsx @@ -358,7 +358,7 @@ const Preview: React.FC = (props) => { } const getHighlightWords = () => { - const objects = list[current].objects; + const objects = objectsFilter ? objectsFilter(list[current]) : list[current].objects; return categories .filter((category) => objects.find((obj: any) => obj.categoryId === category.id)) .map((category) => {