How to load action form quicker on edit page?
Hello,
I am using hintAction with Action form on my edit page where I have to disable all the fields and edit only using hintAction.
it works fine with the code in the screenshot but it takes a few seconds to load up the form modal, please let me know if there is any way to make it faster as it is a fast paced business and the form has to work quick.
Thank you
12 Replies
You can't really solve this right now. It's in the nature of Livewire, that the whole component (here Page) is rerendered β not only the modal.
Hi @Dennis Koch client is too much concerned about this issue as he needs to do inline or modal form editing on the edit page and keeping all input's disabled.
Isn't there are way to stop re-rendering full page before clicking on save please ?
No, there isn't a solution to this right now. I think this is solved in v4 but we still don't have an ETA for that
I hope so, thank you so much for the reply π
I hope it will be solved in v4
@Dennis Koch if that is not a possibility for now, I would really like to add something which I have convinced my client for. i.e. on edit page i just need to make the input field colored or show a hint that this field has been changed before saving.
Sorry for tagging you.
bump
try this
Hi, thank you so much, let me try this.
Hi @Leonardo Ferreira it works but the speed is same as the code I used, but I understand it is the nature of Livewire so it will work like this.
local env?
yes
weird.. are you using debugbar?
no, this is a ride booking form so a few form fields are live which actually calculates the price for the trip when those fields change, I think when the form re-renders those calculations are done again.
Probably need to change that to be triggered by a button instead of changes in those fields.
ahh, probably
Thank you so much, this is a pretty clean code and I will use it.
@LeandroFerreira I just got an idea to use disabledOn("edit") and then use hintAction to enable that particular component which works fine but the issue is when I save the form then all the disabledOn("edit") fields do not pass the data even though they are enabled using $component->disabled(false);
if I will be able to save the data after enabling it this way then it would be much better and easy to work with.