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

[Live] Preserve file input values after render requests #2628

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

akyoscommunication
Copy link

Q A
Bug fix? yes
New feature? no
Issues Fix #2625
License MIT

Remove three lines in live_controller.js to avoid file input to be cleared after re-render. Tests ok, test in real conditions on production projects ok.

I am not certain if anyone knows the original purpose of these three lines, whether they had a specific reason for being included, or if they should indeed be removed.

As this is my first pull request, I would appreciate any feedback if I've overlooked something or can improve the process.

Thanks

@carsonbot carsonbot added Bug Bug Fix Status: Needs Review Needs to be reviewed labels Mar 6, 2025
Copy link

github-actions bot commented Mar 6, 2025

📊 Packages dist files size difference

Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
Please review the changes and make sure they are expected.

FileBefore (Size / Gzip)After (Size / Gzip)
LiveComponent
live_controller.js 120 kB / 23.4 kB 119.89 kB0% / 23.38 kB0%

@smnandre
Copy link
Member

smnandre commented Mar 9, 2025

There is a problem with your implementation, now files are never removed :)

For the initial reasons, I believe this thread contains most of it #834 (comment)

I'm just not sure if all what applied then still does today (data-model/name, Morphdom behaviour, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix Status: Needs Review Needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[LiveForm] Files cleared when form error
3 participants