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<*>) {
|
||||
const { price, onChange } = this.props;
|
||||
const amount = event.target.value ? parseFloat(event.target.value) : '';
|
||||
onChange({
|
||||
currency: price.currency,
|
||||
amount: parseFloat(event.target.value),
|
||||
amount,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -50,7 +51,7 @@ export class FormFieldPrice extends React.PureComponent<Props> {
|
|||
type="number"
|
||||
className="form-field input--price-amount"
|
||||
min={min}
|
||||
value={price.amount || ''}
|
||||
value={price.amount}
|
||||
onChange={this.handleAmountChange}
|
||||
placeholder={placeholder || 5}
|
||||
disabled={disabled}
|
||||
|
|
Loading…
Add table
Reference in a new issue