Skip to content

Commit

Permalink
Fix bug with display of genotype colorby control
Browse files Browse the repository at this point in the history
Updating genotype colorby should change value and not placeholder
  • Loading branch information
trvrb committed Mar 16, 2017
1 parent 696d646 commit 4c26f15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/controls/color-by.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ class ColorBy extends React.Component {
}

genotypeInput() {
let placeholder = "Genome position";
let value = "";
if (this.props.colorBy) {
if (this.props.colorBy.slice(0, 2) === "gt") {
placeholder = this.props.colorBy.slice(3);
value = this.props.colorBy.slice(3);
}
}
if (this.state.selected === "gt") {
return (
<input type="text" placeholder={placeholder}
<input type="text" placeholder="Genome position" value={value}
onChange={(e) => this.setGenotypeColorBy(e.target.value)}
/>
);
Expand Down

0 comments on commit 4c26f15

Please sign in to comment.