Я пытаюсь ограничить ввод целыми числами.Я пытаюсь передать атрибут шага, который, кажется, работает, когда используется непосредственно в HTML, но мне трудно получить его от реакции.Ниже мой метод рендеринга, а числовой ввод внизу.Проблема, которую я имею, состоит в том, что ввод все еще принимает десятичное число.
render() {
const {
currentVariableValue,
type,
currentVariable,
variablePayload,
} = this.props
const lowHi = this.getLowHi()
const lowHiDisplay = `between ${lowHi[0]} and ${lowHi[1]}`
/* eslint-disable no-nested-ternary */
return (
<ResponseContainer>
{
type === 'text' ?
<TransparentTextArea
autoFocus
type="text"
value={ currentVariableValue }
onChange={ this.handleUpdateValue }
onFocus={ this.handleFocus }
onKeyPress={ this.handleKeyPress }
key={ currentVariable }
/> :
type === 'paragraph' ?
<TransparentTextArea
autoFocus
type="text"
value={ currentVariableValue }
onChange={ this.handleUpdateValue }
onFocus={ this.handleFocus }
onKeyPress={ this.handleKeyPress }
key={ currentVariable }
style={ { height: '300px', width: '95%', fontSize: '1.4em' } }
/> :
<TransparentInput
autoFocus
type="numeric"
value={ currentVariableValue }
onChange={ this.handleUpdateValue }
onFocus={ this.handleFocus }
onKeyPress={ this.handleKeyPress }
key={ currentVariable }
invalid={ !variablePayload.isValid }
step={ 1 }
/>
}