|
@ -73,24 +73,27 @@ class PriceInput extends React.Component { |
|
|
// Should provide an event to pass value to Form. |
|
|
// Should provide an event to pass value to Form. |
|
|
const { onChange } = this.props; |
|
|
const { onChange } = this.props; |
|
|
if (onChange) { |
|
|
if (onChange) { |
|
|
onChange(Object.assign({}, this.state, changedValue)); |
|
|
onChange({ |
|
|
|
|
|
...this.state, |
|
|
|
|
|
...changedValue, |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
render() { |
|
|
render() { |
|
|
const { size } = this.props; |
|
|
const { size } = this.props; |
|
|
const { state } = this; |
|
|
const { currency, number } = this.state; |
|
|
return ( |
|
|
return ( |
|
|
<span> |
|
|
<span> |
|
|
<Input |
|
|
<Input |
|
|
type="text" |
|
|
type="text" |
|
|
size={size} |
|
|
size={size} |
|
|
value={state.number} |
|
|
value={number} |
|
|
onChange={this.handleNumberChange} |
|
|
onChange={this.handleNumberChange} |
|
|
style={{ width: '65%', marginRight: '3%' }} |
|
|
style={{ width: '65%', marginRight: '3%' }} |
|
|
/> |
|
|
/> |
|
|
<Select |
|
|
<Select |
|
|
value={state.currency} |
|
|
value={currency} |
|
|
size={size} |
|
|
size={size} |
|
|
style={{ width: '32%' }} |
|
|
style={{ width: '32%' }} |
|
|
onChange={this.handleCurrencyChange} |
|
|
onChange={this.handleCurrencyChange} |
|
|