Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag handle #15

Open
rolinbos opened this issue Nov 8, 2021 · 0 comments
Open

Drag handle #15

rolinbos opened this issue Nov 8, 2021 · 0 comments

Comments

@rolinbos
Copy link

rolinbos commented Nov 8, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant