From 29a530e4097ac643f7959e5a39765829cc3d634d Mon Sep 17 00:00:00 2001 From: Sara Date: Tue, 19 Dec 2023 18:47:57 +0100 Subject: [PATCH] fix select speaker action --- .../transcripts/[transcriptId]/correct/participantList.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/app/[domain]/transcripts/[transcriptId]/correct/participantList.tsx b/www/app/[domain]/transcripts/[transcriptId]/correct/participantList.tsx index ab05c980..24c97d04 100644 --- a/www/app/[domain]/transcripts/[transcriptId]/correct/participantList.tsx +++ b/www/app/[domain]/transcripts/[transcriptId]/correct/participantList.tsx @@ -14,7 +14,6 @@ type ParticipantList = { stateSelectedText: any; }; // NTH re-order list when searching -// HTH case-insensitive matching const ParticipantList = ({ transcriptId, participants, @@ -45,8 +44,8 @@ const ParticipantList = ({ setOneMatch(undefined); setSelectedParticipant(participant); setAction("Rename"); - } else if (!selectedParticipant) { - setSelectedParticipant(undefined); + } else { + setSelectedParticipant(participant); setParticipantInput(""); setOneMatch(undefined); setAction("Create to rename"); @@ -187,6 +186,7 @@ const ParticipantList = ({ .then(() => { participants.refetch(); setLoading(false); + setAction(null); }) .catch((e) => { setError(e, "There was an error renaming");