-
Versionlatest cdn 3.x.x version Expected BehaviourWhen Initiating X-Sort on a div with no children the handles should be respected when children are added. Actual BehaviourWhen Initiating X-Sort on a div with no children the handle behavior is ignored when any children are added, they are however still sortable. Replication StepsI made a JsFiddle Add a dynamic item with the button and the sort handles wont work as expected on the empty list, but do on the list with children set. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This issue has been converted to a discussion as we are now using discussions to track bugs and ideas. |
Beta Was this translation helpful? Give feedback.
-
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) |
Beta Was this translation helpful? Give feedback.
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)