Skip to content

Commit

Permalink
[instrument builder] Min/max null default value
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Jul 8, 2020
1 parent a1b8b44 commit 700ef20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/instrument_builder/jsx/react.questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,8 @@ class ListElements extends Component {
break;
case 'numeric':
newState.Options = {
MinValue: 0,
MaxValue: 0,
MinValue: null,
MaxValue: null,
};
break;
default:
Expand Down Expand Up @@ -703,7 +703,7 @@ class AddElement extends Component {
let min = this.state.Options.MinValue;
let max = this.state.Options.MaxValue;

if (min >= max) {
if (min && max && min >= max) {
let temp = (this.state.error) ? this.state.error : {};
temp.numeric = 'Max value must be larger than min value';
this.setState({
Expand Down

0 comments on commit 700ef20

Please # to comment.