I'm stacked. I want to integrate with React-Semantic-UI Component with redux-form. Field components don't handle input. I typed some values from the keyboard and nothing happens, input fields steel empty. Pls someone helps, what I am doing wrong? I find some relevant questions on this topic but nothing helped.
import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import { Button, Form, Message, Progress, Checkbox } from 'semantic-ui-react';
const renderField = ({
label,
input,
name,
placeholder,
type,
meta: { touched, error, warning }
}) => (
<Form.Input required inline {...input} value={input.value} name={name} onChange={(param, {value}) => input.onChange(value)} label={label} placeholder={placeholder} />
)
const Registration = props => {
const { handleSubmit, pristine, reset, submitting } = props
return (
<Form loading={false} onSubmit={handleSubmit}>
<Field
name="name"
type="text"
component={renderField}
label="Имя"
placeholder="введите ваше имя"
/>
<Field
name="email"
type="text"
component={renderField}
label="Email"
placeholder="введите действующую почту"
/>
<Field
name="password"
type="password"
component={renderField}
label="Password"
placeholder="придумайте пароль"
/>
<Field
name="confrim"
type="Confirm"
component={renderField}
label="Имя"
placeholder="повторите ваш пароль"
/>
<Form.Field>
<Checkbox name="agree" label='I agree to the Terms and Conditions' />
</Form.Field>
<Message
success
header='Form Completed'
content="You're all signed up for the newsletter"
/>
<Progress color="red" percent={100} />
<Button disabled={!pristine} type="submit">Ок</Button>
</Form>
)
}
export default reduxForm(
{form: 'registration'}
)(Registration)