mother / react-files

A file input (dropzone) management component for React
MIT License
145 stars 35 forks source link

Prop id for improve the input handling #39

Closed developeratalaya1 closed 1 year ago

developeratalaya1 commented 2 years ago

i had a problem because i wanted a button for select files in the files modal, one solution for that was use a label tag for open the input when i click the modal tag, so i needed add a id to the input for use the label correctly.

code: image use: image result Button (Elegir archivo) that is a label and when i click open the file modal image

If someone have a better solution i appreciate it.

asabhaney commented 2 years ago

Hey thanks @developeratalaya1 @jarrisoncano. Have you tried using the latest version (v3.0.0-alpha.2) per chance? You can pass whatever underlying props you want to the input field using inputProps. I think that should address your use case. It was added in this commit: https://github.com/mother/react-files/pull/32/commits/286f666bb3d61c484a37ce82f9544858d9eae0c0

asabhaney commented 1 year ago

Closed in favour of #32