Skip to content

Commit e408c62

Browse files
authored
fix(list, list-item): calcite-select becomes unresponsive in a list-item if drag-disabled is true (#8957)
**Related Issue:** #8954 ## Summary - Sortablejs by default calls `event.preventDefault()` because the option `preventOnFilter` is true by default. - This affects any elements slotted within the `drag-disabled` list item. - In order to fix this, we move the `filter` selector to just the `calcite-handle` instead of the whole `list-item`. ```js filter: ".ignore-elements", // Selectors that do not lead to dragging (String or Function) preventOnFilter: true, // Call `event.preventDefault()` when triggered `filter` ```
1 parent ea8ea1e commit e408c62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/calcite-components/src/utils/sortableComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export function connectSortableComponent(component: SortableComponent): void {
129129
},
130130
}),
131131
handle,
132-
filter: "[drag-disabled]",
132+
filter: `${handle}[disabled]`,
133133
onStart: ({ from: fromEl, item: dragEl, to: toEl, newIndex, oldIndex }) => {
134134
dragState.active = true;
135135
onGlobalDragStart();

0 commit comments

Comments
 (0)