Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Selecting a file with file input does not change form.dirty value to true #454

Closed
lucasthevenet opened this issue Feb 14, 2024 · 0 comments · Fixed by #457
Closed

Selecting a file with file input does not change form.dirty value to true #454

lucasthevenet opened this issue Feb 14, 2024 · 0 comments · Fixed by #457
Labels
bug Something isn't working

Comments

@lucasthevenet
Copy link

lucasthevenet commented Feb 14, 2024

Describe the bug and the expected behavior

When selecting a file with file type input, it should change the forms dirty value to true, the same as what would happen if I changed the text value in a text input.

The behavior works when the file input element has multiple=true, but not when it doesn't

Conform version

v1.0.1

Steps to Reproduce the Bug or Issue

  1. Open this reproduction repo: https://stackblitz.com/edit/github-qiy4lh?file=app%2Froutes%2Fdirty-file.tsx
  2. Navigate to the "Dirty file input reproduction" section
  3. Upload any file and visualize that the dirty state does not change in comparison to when typing in the text input.

What browsers are you seeing the problem on?

No response

Screenshots or Videos

No response

Additional context

No response

@lucasthevenet lucasthevenet changed the title Selecting a file (or files) with file input does not change form.dirty value to true Selecting a file with file input does not change form.dirty value to true Feb 14, 2024
@edmundhung edmundhung added the bug Something isn't working label Feb 14, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants