Skip to content
Permalink
Browse files
JENKINS-42640: Parse the value of the input of integer and decimal pa…
…rameter before setting it in step data. (#30)
  • Loading branch information
jviolas authored and kzantow committed Mar 9, 2017
1 parent 3cd61a0 commit e0a0d5c3cee8fbe6f79d449570df8de92bddb4b7
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/main/js/components/properties/DecimalPropertyInput.jsx
  2. +1 −1 src/main/js/components/properties/IntegerPropertyInput.jsx
@@ -7,7 +7,7 @@ export default class DecimalPropertyInput extends React.Component {
<label className="form-label">{this.props.type.capitalizedName + (this.props.type.isRequired ? '*' : '')}</label>
<div className="TextInput">
<input type="number" className="TextInput-control" defaultValue={this.props.step.data[this.props.propName]}
onChange={e => { this.props.step.data[this.props.propName] = e.target.value; this.props.onChange(this.props.step); }}/>
onChange={e => { this.props.step.data[this.props.propName] = parseFloat(e.target.value); this.props.onChange(this.props.step); }}/>
</div>
</div>
);
@@ -7,7 +7,7 @@ export default class IntegerPropertyInput extends React.Component {
<label className="form-label">{this.props.type.capitalizedName + (this.props.type.isRequired ? '*' : '')}</label>
<div className="TextInput">
<input type="number" className="TextInput-control" defaultValue={this.props.step.data[this.props.propName]}
onChange={e => { this.props.step.data[this.props.propName] = e.target.value; this.props.onChange(this.props.step); }}/>
onChange={e => { this.props.step.data[this.props.propName] = parseInt(e.target.value); this.props.onChange(this.props.step); }}/>
</div>
</div>
);

0 comments on commit e0a0d5c

Please sign in to comment.