question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FileInput onChange event not called when files are removed

See original GitHub issue

Expected Behavior

The new FileInput component (introduced from issue #2535) onChange event should be called when files are removed so client code can responded to removal.

Actual Behavior

onChange is only called when files are added.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ericsoderberghpcommented, Mar 3, 2021

Part of my point was we don’t have onAdd, when adding a subsequent file to a multiple file input. Also, Select that allows multiple options being selected only indicates changes to the selected options via onChange. I think it is more consistent to stay with just onChange.

0reactions
jcfilbencommented, Sep 24, 2021

Closing since #5028 was merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML input file selection event not firing upon selecting the ...
It adds an event listener to 'change', but I tested it and it triggers even if you choose the same file and not...
Read more >
Input File change event not working - EncodeDna.com
A simple solution to get rid of this issue will be, to clear the file input value. I'll show you how. Let's see...
Read more >
Using files from web applications - Web APIs - MDN Web Docs
Accessing selected file(s) on a change event. It is also possible (but not mandatory) to access the FileList through the change event.
Read more >
JavaScript OnChange file input | by Quang Nguyen - Medium
Last month, I was working on a project that involved file/image uploading and I ... so the default input file name will not...
Read more >
How to programmatically fire a click event for a file input ...
Example 1: We want to click the input file element automatically (programmatically). When the user clicks one button which is not the 'file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found