Text input gets deleted after file upload is done
I have a very simple form
The problem is that if you start a file upload and begin typing before the upload is done, some of the text you've typed gets deleted when the upload is done.
I've attached a video of how this looks. In it you can see that even though I have the 'a' button pressed, some of the text gets randomly deleted. This happens whenever a file is done uploading.
Is there a way to solve this?
Thank you.
3 Replies
This is not a bug, it's a normal hydration/re-rendering behavior that you will face with any interactive Livewire fields
In Livewire the State is refreshed with every request/response so after the upload is done a livewire response or request is happened to update the state and refreshes the form data
Due to a latency in the connections will get an outdated field state of cource
can be noticed more often with slow connections
just try it with any other
->live()
field to check
I do not know any solution for it as it is a normal behavior not a bugYeap, I get why it happens, I'm just hoping there is a way around it.
Not really, you can try and debounce higher, but I would suggest putting files on a seperate page. Or adding a loading indicator