fix: allow 0.xx entries for publish cost

This commit is contained in:
Sean Yesmunt 2018-04-04 12:32:02 -04:00
parent 5489d99099
commit 778466bb1a

View file

@ -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}