Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. renderInput = ({ input, meta, placeholder, ...props }) => {
  2.     const error = (meta.error && meta.touched && !meta.active) || false
  3.     const isValid = !meta.error && meta.touched && !meta.active
  4.    
  5.     return (
  6.       <Input
  7.         {...input}
  8.         {...props}
  9.         error={error}
  10.         isValid={isValid}
  11.         placeholder={error ? meta.error : placeholder}
  12.       />
  13.     )
  14.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement