From 280fbb21264e7f4e361c049f31c16830085717b4 Mon Sep 17 00:00:00 2001 From: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com> Date: Sat, 23 Sep 2023 13:44:19 +0200 Subject: [PATCH] Clear select on skip --- .../components/Tagger/scenes/PerformerResult.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ui/v2.5/src/components/Tagger/scenes/PerformerResult.tsx b/ui/v2.5/src/components/Tagger/scenes/PerformerResult.tsx index c0e08eefddc..35d609e7b59 100755 --- a/ui/v2.5/src/components/Tagger/scenes/PerformerResult.tsx +++ b/ui/v2.5/src/components/Tagger/scenes/PerformerResult.tsx @@ -42,9 +42,7 @@ const PerformerResult: React.FC = ({ stashID.stash_id === performer.remote_site_id ); - const [selectedPerformer, setSelectedPerformer] = useState< - Performer | undefined - >(); + const [selectedPerformer, setSelectedPerformer] = useState(); useEffect(() => { if ( @@ -55,7 +53,7 @@ const PerformerResult: React.FC = ({ } }, [performerData?.findPerformer, selectedID]); - const handlePerformerSelect = (performers: Performer[]) => { + const handleSelect = (performers: Performer[]) => { if (performers.length) { setSelectedPerformer(performers[0]); setSelectedID(performers[0].id); @@ -65,7 +63,8 @@ const PerformerResult: React.FC = ({ } }; - const handlePerformerSkip = () => { + const handleSkip = () => { + setSelectedPerformer(undefined); setSelectedID(undefined); }; @@ -82,7 +81,7 @@ const PerformerResult: React.FC = ({ - v ? handlePerformerSkip() : setSelectedID(matchedPerformer.id) + v ? handleSkip() : setSelectedID(matchedPerformer.id) } >
@@ -126,13 +125,13 @@ const PerformerResult: React.FC = ({