asantibanez / laravel-blade-sortable

Custom Blade components to add sortable/drag-and-drop HTML elements in your apps.
MIT License
409 stars 79 forks source link

nested livewire component issue when drag/drop from groupe to another #7

Open zangetsuz opened 3 years ago

zangetsuz commented 3 years ago

when I dont use the "formesm" component it work flawlessly. but using it when I sort in the same div it work but when I drag to another div (groupe) it crash index.js:32 Uncaught (in promise) TypeError: Cannot read property 'fingerprint' of null at new Component (index.js:32) at onNodeAdded (index.js:476) ... grpcard component view calling the formesm component

        <x-laravel-blade-sortable::sortable
            wire:key="{{$grp->id}}"
            name="{{$grp->id}}"
            group="people"     animation="700"
            ghost-class="opacity-50"
            wire:onSortOrderChange="handleSortOrderChange"
        >

        @if($grp->formes)
        @foreach($grp->formes as $forme)
                    <x-laravel-blade-sortable::sortable-item sort-key="{{$forme->id}}" wire:key="{{$forme->id}}">
                       <div class="w-2/4">

                           <livewire:formesm :forme="$forme" :key="$forme->id"></livewire:formesm>

                       </div>
                    </x-laravel-blade-sortable::sortable-item>

                @endforeach
            @endif

        </x-laravel-blade-sortable::sortable>
        </div>

formesm component : between two div just echo the $forme->prenom

{{$forme->prenom}}