[LiveComponents] RFC: change default behavior to set model on "change" instead of input
Right now, if you have:
<input data-model="name">
Then the model will be set (and an Ajax call will be made to re-render) while your typing. It waits until you stop typing for a moment (debouncing), but if you typed Ryan (short pause) then Weaver, that would create 2 Ajax requests.
You can currently alter this behavior to not send the Ajax request until the field changes with:
<input data-model="on(change)|name">
For an input field, this means you stop typing and then "leave" the field.
Proposal
The proposal is to reverse the default value so that models update based on change by default. You could change to the previous default behavior via on(input)|name.
The motivation behind this is that Livewire is planning to change this for their v3. I like keeping consistency with Livewire when possible. And more importantly, they have a lot of real-world experience, and if they are going through the BC-breaking change of reversing the default, it's probably for a good reason (the reason is stated as reducing unnecessary work/Ajax requests).
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Friendly reminder that this issue exists. If I don't hear anything I'll close this.
Hey,
I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!