From a8833e4155cb5068b3ff95a07861dd1f10dbfa53 Mon Sep 17 00:00:00 2001 From: Katie Stahl Date: Fri, 23 Aug 2024 12:29:50 -0400 Subject: [PATCH] removing editable field for now since it's not working as designed, will revisit at a later date --- .../TxSegmentElementInput.tsx | 1 - .../Utilities/GetCoordinates/GetCoordinates.tsx | 15 +++++++-------- .../shared/ChromosomeField/ChromosomeField.tsx | 6 ++---- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/client/src/components/Pages/Structure/Input/TxSegmentElementInput/TxSegmentElementInput.tsx b/client/src/components/Pages/Structure/Input/TxSegmentElementInput/TxSegmentElementInput.tsx index e98dfe92..cf33662f 100644 --- a/client/src/components/Pages/Structure/Input/TxSegmentElementInput/TxSegmentElementInput.tsx +++ b/client/src/components/Pages/Structure/Input/TxSegmentElementInput/TxSegmentElementInput.tsx @@ -445,7 +445,6 @@ const TxSegmentCompInput: React.FC = ({ diff --git a/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx b/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx index c671624d..bb0b8db6 100644 --- a/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx +++ b/client/src/components/Utilities/GetCoordinates/GetCoordinates.tsx @@ -19,7 +19,7 @@ import { } from "../../../services/main"; import { CoordsUtilsResponse, - GenomicData, + GenomicTxSegService, } from "../../../services/ResponseModels"; import StrandSwitch from "../../main/shared/StrandSwitch/StrandSwitch"; import TabHeader from "../../main/shared/TabHeader/TabHeader"; @@ -99,7 +99,7 @@ const GetCoordinates: React.FC = () => { const [exonStartOffset, setExonStartOffset] = useState(""); const [exonEndOffset, setExonEndOffset] = useState(""); - const [results, setResults] = useState(null); + const [results, setResults] = useState(null); const [error, setError] = useState(""); // programming horror @@ -184,7 +184,7 @@ const GetCoordinates: React.FC = () => { }); } else { clearWarnings(); - setResults(coordsResponse.coordinates_data as GenomicData); + setResults(coordsResponse.coordinates_data as GenomicTxSegService); } }; @@ -277,7 +277,6 @@ const GetCoordinates: React.FC = () => { fieldValue={chromosome} errorText={chromosomeText} onChange={handleChromosomeChange} - editable={inputType == "genomic_coords_tx"} /> @@ -416,16 +415,16 @@ const GetCoordinates: React.FC = () => { value={inputType} onChange={(event) => setInputType(event.target.value as string)} > - + Select input data - + Genomic coordinates, gene - + Genomic coordinates, transcript - + Exon coordinates, transcript diff --git a/client/src/components/main/shared/ChromosomeField/ChromosomeField.tsx b/client/src/components/main/shared/ChromosomeField/ChromosomeField.tsx index 5776aef5..a35b28a4 100644 --- a/client/src/components/main/shared/ChromosomeField/ChromosomeField.tsx +++ b/client/src/components/main/shared/ChromosomeField/ChromosomeField.tsx @@ -1,5 +1,5 @@ import { makeStyles, TextField, Typography } from "@material-ui/core"; -import React, { KeyboardEventHandler } from "react"; +import React, { ChangeEvent } from "react"; import HelpTooltip from "../HelpTooltip/HelpTooltip"; interface Props { @@ -7,14 +7,13 @@ interface Props { errorText: string; width?: number | undefined; editable?: boolean; - onChange?: (event: any) => void; + onChange?: (event: ChangeEvent) => void; } const ChromosomeField: React.FC = ({ fieldValue, errorText, width, - editable, onChange, }) => { const useStyles = makeStyles(() => ({ @@ -45,7 +44,6 @@ const ChromosomeField: React.FC = ({ error={errorText != ""} label="Chromosome" helperText={errorText != "" ? errorText : null} - contentEditable={editable} onChange={onChange} className={classes.textField} />