asantibanez/laravel-blade-sortable

Drag handle

Opened this issue · 0 comments

I have the following code for the drag handle:

    <x-laravel-blade-sortable::sortable
            animation="1000"
            ghost-class="opacity-25"
            drag-handle="drag-handle"
    >
            <x-laravel-blade-sortable::sortable-item sort-key="jason">
                Jason
                <div class="bg-red-100 drag-handle">
                    Drag
                </div>
            </x-laravel-blade-sortable::sortable-item>
            <x-laravel-blade-sortable::sortable-item sort-key="andres">
                Andres
                <div class="bg-red-100 drag-handle">
                      Drag
                </div>
            </x-laravel-blade-sortable::sortable-item>
            <x-laravel-blade-sortable::sortable-item sort-key="matt">
                Matt
                <div class="bg-red-100 drag-handle">
                    Drag
                </div>
            </x-laravel-blade-sortable::sortable-item>
            <x-laravel-blade-sortable::sortable-item sort-key="james">
                James
                <div class="bg-red-100 drag-handle">
                    Drag
                </div>
            </x-laravel-blade-sortable::sortable-item>
    </x-laravel-blade-sortable::sortable>

But you can now drag the element if you are outside the div of drag handle. I just want you to be able to move it only when you press the drag handle. Does the documentation say it can be done this way? Am I doing something wrong?