My app allows you to edit the draggable list item text. With dragging enabled, the user cannot drag to select text.
Is there a way to temporarily remove the draggability while they are editing?
Ah, I just tapped into the 'disabled' option from Sortable.JS by adding that tied to a variable in the <draggable> component:
<draggable v-model="orderedTasks" :options="{disabled: editFocused}">
editFocused is a variable that I toggle the value of when a user is editing list item text.
Options props is deprecated, you can use :disabled="editFocused"
Most helpful comment
Ah, I just tapped into the 'disabled' option from Sortable.JS by adding that tied to a variable in the
<draggable>component:<draggable v-model="orderedTasks" :options="{disabled: editFocused}">editFocusedis a variable that I toggle the value of when a user is editing list item text.