Answer the question
In order to leave comments, you need to log in
Why after the event onFocus and onBlur can there be automatic scrolling up?
In the application I use react-matrilal-ui and redux-form.
I would throw off the code, but I can’t even imagine which piece to send, as long as this happens with absolutely any form components. Maybe someone faced such a problem?
Here is an example of ui input
import React, {Component} from 'react'
import TextField from '@material-ui/core/TextField'
import {Field} from "redux-form"
const renderTextField = ({
input,
defaultValue,
label,
value,
meta: {touched, error},
...custom
}) => (
<TextField
hinttext={error}
floatinglabeltext={label}
errortext={touched && error ? error : ''}
{...input}
{...custom}
label={touched && error ? error : label}
error={touched && error ? true : false}
defaultValue={value}
/>
)
class MaterialInput extends Component {
render() {
const {...props} = this.props
return <Field {...props} component={renderTextField}/>
}
}
export default MaterialInput
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question