Redux-form semantic UI with AsyncValidation
See original GitHub issueNeed help
I followed this example http://redux-form.com/6.6.3/examples/submitValidation/ and http://redux-form.com/6.6.3/examples/asyncValidation/
I use Semanitic-UI & made a loading state Redux-form component as code below:
Loading state of the semantic Input is:
<Input loading icon='user' placeholder='Whatever...' />
You could find it here
And the render Field component is:
...
const ReduxFormInput = ({ input, label, placeholder, checkboxLabel, type, meta: { asyncValidate, touched, error } }) => {
const errorMessage = (<div style={{ color: '#E20000', paddingTop: '.3rem', fontSize: '12px' }} >
<Icon name="warning" />
{error}
</div>);
return (
<div>
<Label>{label}</Label>
<Input
{...input}
type={type}
placeholder={placeholder}
error={error ? true : null}
loading={asyncValidate ? true : undefined} // load loading state when submitting
icon={asyncValidate ? 'user' : undefined} // load icon state when submitting
/>
{touched && error && errorMessage}
</div>
);
};
export default ReduxFormInput;
The form work perfectly instead of Async Loading state within semantic-ui component.
My expect is the icon loading when submitting form
Thank you so much.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Redux-form semantic UI with AsyncValidation - Stack Overflow
Ok, I found my answer const ReduxFormInput = ({ input, label, placeholder, checkboxLabel, type, meta: { submitting, asyncValidate, touched, error } }) =>...
Read more >Redux-form semantic UI with AsyncValidation · Issue #2869 - GitHub
Need help I followed this example http://redux-form.com/6.6.3/examples/submitValidation/ and http://redux-form.com/6.6.3/examples/asyncValidation/ I use ...
Read more >Material UI Example - Redux Form
For Material UI, @erikras has published a set of wrapper components to use Material UI: redux-form-material-ui . How to use async validation in...
Read more >semantic-ui-react-with-redux-form - CodeSandbox
CodeSandbox is an online editor tailored for web applications.
Read more >Is it possible to save redux-form data by UUID? - Stack Overflow
Can't find any examples on https://redux-form.com form: { [uuid1]: { form1 form2 . ... Redux-form semantic UI with AsyncValidation.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@viiiprock you are welcome, btw console.log() will help you to understand what props are passed 😉
@viiiprock
const ReduxFormInput = ({ input, label, placeholder, checkboxLabel, type, meta: { submitting, asyncValidate, touched, error } }) => ...
What about like this?