Skip to content

Sort Plugin: Handles not working when added to an empty X-Sort parent #4540

Answered by SimoTod
tyu-tyu asked this question in 1. Help
Discussion options

You must be logged in to vote

The handle directive needs to be defined onto at least one child element when the plugin kicks in, it doesn't re initialise anytime you add an element. You need to use the custom configuration if your list is empty: https://alpinejs.dev/plugins/sort#custom-configuration (and sortable plugin documentation)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tyu-tyu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #4539 on February 17, 2025 10:26.