-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FileUploadReactHooks #242
Add FileUploadReactHooks #242
Conversation
Just fileInput -> do | ||
maybeFiles <- (HTMLInputElement.files fileInput) | ||
for_ maybeFiles | ||
(FileList.items >>> map File.name >>> setFileList) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this compile? If so, it gets rid of that case statement.
handleChange t =
for_ (HtmlInputElement.fromEventTarget t) \fileInput -> do
maybeFiles <- (HTMLInputElement.files fileInput)
for_ maybeFiles (setFileList <<< map File.name <<< FileList.items)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 It does, and I like it 👍 678f287
I'm guessing this is ready to merge once CI passes, correct? |
Yes, I've tested that it works as expected & I'm happy with the code 👍 |
Thanks! |
Partially addresses #157