asantibanez/laravel-blade-sortable

$dom.getAttribute is not a function

maximus1127 opened this issue · 0 comments

Hi, trying to use this with a livewire component.

                @foreach ($p1->chunk(4) as $chunk)
                <div class="row" style="background-color: #8cdba9; margin-bottom: 7px; padding: 10px;">
                    <x-laravel-blade-sortable::sortable>
                        @foreach ($chunk as $item)
                          <x-laravel-blade-sortable::sortable-item as='label' class="checkbox-inline col-3" sort-key="{{$item->order_position}}"  drag-handle="drag-handle">
                            {{-- <label class="checkbox-inline col-3"> --}}
                                <input type="checkbox" value="1" id="item{{$item->id}}" @if (in_array($item->id, $currentConfigs)) checked @endif wire:click="updateConfig({{ $item->id }})"> {!! $item->value !!}
                            {{-- </label> --}}
                        </x-laravel-blade-sortable::sortable-item>
                        @endforeach
                    </x-laravel-blade-sortable::sortable>
                    </div>
                @endforeach

When I do this and try to click my element, the console prints this error:
image

I have my scripts in the file listed in this order:
@livewire
/js/app.js
and lastly the x-laravel-blade-sortable::scripts/

I have installed alpine and sortable through NPM and run npm dev to compile the scripts (within Laravel) after including/requiring the libraries in the app/bootstrap.js files.

What is causing this error?