From d15a82c7d067669ca8e0378e9266b4e95cc89aeb Mon Sep 17 00:00:00 2001 From: Katie Stahl Date: Fri, 20 Sep 2024 09:26:51 -0400 Subject: [PATCH] fix: get coordinates not working for transcript (#334) --- .../Utilities/GetCoordinates/GetCoordinates.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx b/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx index a5eda92..a7cfe57 100644 --- a/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx +++ b/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx @@ -108,13 +108,18 @@ const GetCoordinates: React.FC = () => { const [isLoading, setIsLoading] = useState(false); const [responseWarnings, setResponseWarnings] = useState([]); + const genomicInputComplete = + genomicInputType === GenomicInputType.GENE + ? gene !== "" && selectedTranscript !== "" + : txAc !== ""; + // programming horror const inputComplete = - (inputType === "genomic_coords" && - gene !== "" && + (inputType === TxElementInputType.gc && + genomicInputComplete && chromosome !== "" && (start !== "" || end !== "")) || - (inputType === "exon_coords" && + (inputType === TxElementInputType.ec && txAc !== "" && (exonStart !== "" || exonEnd !== ""));