Help Wanted
Dear all,
Many thanks for this great package.
I have the this code :
<ul class="list-group" wire:sortable="reorderSections" wire:sortable-group="reorderFields"> @foreach($data['structure'] as $i => $section) <li class="list-group-item" wire:sortable.item="{{ $i }}" wire:key="section-{{ $i }}"> {{ __('Section').' : '.$section['name'][app()->getLocale()] ?? __('Undefined') }} <span wire:sortable.handle><i class="fas fa-sort"></i></span> <ul class="list-group p-4" wire:sortable-group.item-group="{{ $i }}"> @foreach($section['fields'] as $j => $field) <li class="list-group-item" wire:sortable-group.item="{{ $j }}" wire:key="item-{{ $j }}"> {{ __('Field').' : '.$field['name'] }} <span wire:sortable-group.handle><i class="fas fa-sort"></i></span> </li> @endforeach </ul> </li> @endforeach </ul>
And when moving a group's item to another group I have the following result in reorderFields function
array:2 [[▼]() 0 => array:3 [[▼]() "order" => 1 "value" => "0" "items" => array:2 [[▼]() 0 => array:2 [[▼]() "order" => 1 "value" => "0" ] 1 => array:2 [[▼]() "order" => 2 "value" => "0" ] ] ] 1 => array:3 [[▼]() "order" => 2 "value" => "1" "items" => [] ] ]
which is right, but I don't know how to identify the group from where the item is coming from in order to remove it from the global array where all the structure is stored.
Many thanks in advance for your help.
my apologies, I lost myself with keys.
No in fact I still have this issue. Can you please help me
@invaders-xx Hi. Did you figure out how to handle this?
Right now, I don't have any plans to add this. Feel free to create a PR to add this behavior.