What seems to be the problem:
Hi;
I clone form rows with inputs via:
$( $thisRow ).clone(true).insertAfter( $thisRow );
The row clone correctly. They have, for example input with: wire:model="product_name"
After clone we have multiple wire:model="product_name"
The first problem doesn’t make it an array.
I am trying to work around the problem by nesting.
For the first row I set wire:model="product_name.0"
And with clone rename modal in new row by:
$( $thisRow ).children('#product_name').attr("modal", 'product_name.'+index);
Index is of course a larger number than the previous one.
When I send data, the component can only see the tables with the first row.
Is there any way to tell livewire that I added a name with the new model?
I see that the array works for elements with the same name generated by @foreach but I add new lines from javascript.
Are you using the latest version of Livewire: YES