Skip to content

Uncaught Snapshot missing on Livewire component - nested component items #42

Description

@igmltd

Hi,

Doesn't seem to work when the group items are a nested component, getting this error in the console

"Uncaught Snapshot missing on Livewire component with id: KLeG0kT7hyyZB9XYWnMp"

Heres a sample layout:

<div wire:sortable="updateGroupOrder" wire:sortable-group="updateTaskOrder" wire:sortable.options="{ animation: 50 }">
    @foreach ($groups as $group)
        <div wire:sortable.item="{{ $group->id }}" wire:key="group-{{ $group->id }}">
            <h4>{{ $group->label }}</h4>
            <button wire:sortable.handle>drag group</button>
             <div wire:sortable-group.item-group="{{ $group->id }}" wire:sortable-group.options="{ animation: 100 }">
                @foreach ($group->tasks()->orderBy('order')->get() as $task)    
                    
                    
                      <livewire:nested-items wire:key="task-{{ $task->id }}" /> 

                
                @endforeach
            </div>
        </div>
    @endforeach
</div>

Sample nested component blade

<div wire:sortable-group.item="{{ $task->id }}" >
                        <span>{{ $task->title }}</span>
    <button wire:sortable-group.handle>drag item</button>
</div>

Works fine when items not a nested component, any help or guidance would be much appreciated

Using Livewire 3 and latest release of this package.

thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoMore info is needed in order to help

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions