From 2a454e5a1e5e2a97d1f281a96734939d7d28c39e Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:29:13 +1100 Subject: [PATCH] Fix scraped tag name being used in matched scraped tags field (#5462) --- .../Shared/ScrapeDialog/ScrapedObjectsRow.tsx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/ui/v2.5/src/components/Shared/ScrapeDialog/ScrapedObjectsRow.tsx b/ui/v2.5/src/components/Shared/ScrapeDialog/ScrapedObjectsRow.tsx index 078655338..b8a7be085 100644 --- a/ui/v2.5/src/components/Shared/ScrapeDialog/ScrapedObjectsRow.tsx +++ b/ui/v2.5/src/components/Shared/ScrapeDialog/ScrapedObjectsRow.tsx @@ -6,7 +6,7 @@ import { ObjectScrapeResult, ScrapeResult, } from "src/components/Shared/ScrapeDialog/scrapeResult"; -import { TagSelect } from "src/components/Tags/TagSelect"; +import { TagIDSelect } from "src/components/Tags/TagSelect"; import { StudioSelect } from "src/components/Studios/StudioSelect"; import { GroupSelect } from "src/components/Groups/GroupSelect"; @@ -269,17 +269,12 @@ export const ScrapedTagsRow: React.FC< : scrapeResult.originalValue; const value = resultValue ?? []; - const selectValue = value.map((p) => { - const aliases: string[] = []; - return { - id: p.stored_id ?? "", - name: p.name ?? "", - aliases, - }; - }); + const selectValue = value.map((p) => p.stored_id ?? ""); + // we need to use TagIDSelect here because we want to use the local name + // of the tag instead of the name from the source return ( - ({ ...p, stored_id: p.id }))); } }} - values={selectValue} + ids={selectValue} /> ); }