- 
      
- 
        Save Mike1stver/6a508d3897771b78e9157c6c7e7bca86 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import React from 'react'; | |
| const handleChange = (handler) => ({target: {files}}) => | |
| handler(files.length ? {file: files[0], name: files[0].name} : {}); | |
| export default ({ | |
| input: {onChange, onBlur, value: omitValue, ...inputProps}, | |
| meta: omitMeta, | |
| ...props | |
| }) => ( | |
| <input type="file" | |
| onChange={handleChange(onChange)} onBlur={handleChange(onBlur)} | |
| {...inputProps} {...props} /> | |
| ); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
guidance to connect a inputFile to reduxForm