fix: allow 0.xx entries for publish cost
This commit is contained in:
parent
5489d99099
commit
778466bb1a
1 changed files with 3 additions and 2 deletions
|
@ -25,9 +25,10 @@ export class FormFieldPrice extends React.PureComponent<Props> {
|
||||||
|
|
||||||
handleAmountChange(event: SyntheticInputEvent<*>) {
|
handleAmountChange(event: SyntheticInputEvent<*>) {
|
||||||
const { price, onChange } = this.props;
|
const { price, onChange } = this.props;
|
||||||
|
const amount = event.target.value ? parseFloat(event.target.value) : '';
|
||||||
onChange({
|
onChange({
|
||||||
currency: price.currency,
|
currency: price.currency,
|
||||||
amount: parseFloat(event.target.value),
|
amount,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +51,7 @@ export class FormFieldPrice extends React.PureComponent<Props> {
|
||||||
type="number"
|
type="number"
|
||||||
className="form-field input--price-amount"
|
className="form-field input--price-amount"
|
||||||
min={min}
|
min={min}
|
||||||
value={price.amount || ''}
|
value={price.amount}
|
||||||
onChange={this.handleAmountChange}
|
onChange={this.handleAmountChange}
|
||||||
placeholder={placeholder || 5}
|
placeholder={placeholder || 5}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|
Loading…
Add table
Reference in a new issue