Skip to content

Commit

Permalink
removing editable field for now since it's not working as designed, w…
Browse files Browse the repository at this point in the history
…ill revisit at a later date
  • Loading branch information
katiestahl committed Aug 23, 2024
1 parent f26dd9f commit a8833e4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ const TxSegmentCompInput: React.FC<TxSegmentElementInputProps> = ({
<ChromosomeField
fieldValue={txChrom}
errorText={txChromText}
editable={txInputType === TxElementInputType.gct}
onChange={handleChromosomeChange}
/>
<Box mt="18px" width="125px">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -99,7 +99,7 @@ const GetCoordinates: React.FC = () => {
const [exonStartOffset, setExonStartOffset] = useState<string>("");
const [exonEndOffset, setExonEndOffset] = useState<string>("");

const [results, setResults] = useState<GenomicData | null>(null);
const [results, setResults] = useState<GenomicTxSegService | null>(null);
const [error, setError] = useState<string>("");

// programming horror
Expand Down Expand Up @@ -184,7 +184,7 @@ const GetCoordinates: React.FC = () => {
});
} else {
clearWarnings();
setResults(coordsResponse.coordinates_data as GenomicData);
setResults(coordsResponse.coordinates_data as GenomicTxSegService);
}
};

Expand Down Expand Up @@ -277,7 +277,6 @@ const GetCoordinates: React.FC = () => {
fieldValue={chromosome}
errorText={chromosomeText}
onChange={handleChromosomeChange}
editable={inputType == "genomic_coords_tx"}
/>
<Box mt="18px">
<Box className={classes.strand} width="125px">
Expand Down Expand Up @@ -416,16 +415,16 @@ const GetCoordinates: React.FC = () => {
value={inputType}
onChange={(event) => setInputType(event.target.value as string)}
>
<MenuItem value="default" disabled>
<MenuItem value={TxElementInputType.default} disabled>
Select input data
</MenuItem>
<MenuItem value="genomic_coords_gene">
<MenuItem value={TxElementInputType.gcg}>
Genomic coordinates, gene
</MenuItem>
<MenuItem value="genomic_coords_tx">
<MenuItem value={TxElementInputType.gct}>
Genomic coordinates, transcript
</MenuItem>
<MenuItem value="exon_coords_tx">
<MenuItem value={TxElementInputType.ect}>
Exon coordinates, transcript
</MenuItem>
</Select>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
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 {
fieldValue: string;
errorText: string;
width?: number | undefined;
editable?: boolean;
onChange?: (event: any) => void;
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
}

const ChromosomeField: React.FC<Props> = ({
fieldValue,
errorText,
width,
editable,
onChange,
}) => {
const useStyles = makeStyles(() => ({
Expand Down Expand Up @@ -45,7 +44,6 @@ const ChromosomeField: React.FC<Props> = ({
error={errorText != ""}
label="Chromosome"
helperText={errorText != "" ? errorText : null}
contentEditable={editable}
onChange={onChange}
className={classes.textField}
/>
Expand Down

0 comments on commit a8833e4

Please sign in to comment.