Skip to content
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

FormFileUpload does not allow upload the same file after error #39267

Closed
alefesouza opened this issue Mar 7, 2022 · 0 comments · Fixed by #39268
Closed

FormFileUpload does not allow upload the same file after error #39267

alefesouza opened this issue Mar 7, 2022 · 0 comments · Fixed by #39268
Assignees
Labels
[Package] Components /packages/components

Comments

@alefesouza
Copy link
Contributor

Description

The FormFileUpload currently doesn't emit the onChange event when you choose the same file again.

A solution to it would be implement a new event prop that emits when click on the <input type="file"> element, then the parent component can clear the file input when clicking again to choose a new file.

See Automattic/woocommerce-payments#460.

Step-by-step reproduction instructions

  1. Go to a page that has the FormFileUpload component with a onChange event.
  2. Choose any file.
  3. Choose the same file again.

It will not emit the onChange event again, not working as expect for the end user.

Screenshots, screen recording, code snippet

Untitled

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Mar 7, 2022
@mirka mirka added the [Package] Components /packages/components label Mar 9, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants