1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Gas inputs can be changed by up and down arrows (#3598)

* Up and down arrows can control gas inputs.

* input-number.js just uses number type.
This commit is contained in:
Dan J Miller 2018-03-20 20:20:30 -02:30 committed by Alexander Tseung
parent fd3e240dd9
commit a69480d78d
2 changed files with 3 additions and 0 deletions

View File

@ -91,6 +91,7 @@ CurrencyInput.prototype.render = function () {
placeholder, placeholder,
readOnly, readOnly,
inputRef, inputRef,
type,
} = this.props } = this.props
const { emptyState, focused } = this.state const { emptyState, focused } = this.state
@ -99,6 +100,7 @@ CurrencyInput.prototype.render = function () {
const valueToRender = this.getValueToRender() const valueToRender = this.getValueToRender()
return h('input', { return h('input', {
className, className,
type,
value: emptyState ? '' : valueToRender, value: emptyState ? '' : valueToRender,
placeholder: focused ? '' : placeholder, placeholder: focused ? '' : placeholder,
size: valueToRender.length * inputSizeMultiplier, size: valueToRender.length * inputSizeMultiplier,

View File

@ -55,6 +55,7 @@ InputNumber.prototype.render = function () {
className: 'customize-gas-input', className: 'customize-gas-input',
value, value,
placeholder, placeholder,
type: 'number',
onInputChange: newValue => { onInputChange: newValue => {
this.setValue(newValue) this.setValue(newValue)
}, },