Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 e0a0d5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/js/components/properties/DecimalPropertyInput.jsx
Expand Up @@ -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>
);
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/components/properties/IntegerPropertyInput.jsx
Expand Up @@ -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>
);
Expand Down

0 comments on commit e0a0d5c

Please sign in to comment.