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

[v0.2.x] Handle not working when no items on init #34

Merged

Conversation

gdebrauwer
Copy link
Contributor

When using multiple sortable groups, the handle identifier can always be set. If Sortablejs does not find a handle in an item, then the complete item will be draggable.

When using only one group and the group is empty on the initial livewire component load, then every item will be completely draggable. To fix that, we need to listen for component updates and only set the 'handle' option if we detect an item that has a handle.

@gdebrauwer gdebrauwer merged commit ed01343 into v0.2 Oct 18, 2023
@gdebrauwer gdebrauwer deleted the feature/handle-not-working-when-no-items-on-init-in-livewirev2 branch October 18, 2023 08:02
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

Successfully merging this pull request may close these issues.

Drag handle only works if the sortable list contains items in the initial load
1 participant