MCPcopy
hub / github.com/Shopify/draggable / getSortableElementsForContainer

Method getSortableElementsForContainer

src/Sortable/Sortable.js:133–145  ·  view source on GitHub ↗

* Returns sortable elements for a given container, excluding the mirror and * original source element if present * @param {HTMLElement} container * @return {HTMLElement[]}

(container)

Source from the content-addressed store, hash-verified

131 * @return {HTMLElement[]}
132 */
133 getSortableElementsForContainer(container) {
134 const allSortableElements = container.querySelectorAll(
135 this.options.draggable,
136 );
137
138 return [...allSortableElements].filter((childElement) => {
139 return (
140 childElement !== this.originalSource &&
141 childElement !== this.mirror &&
142 childElement.parentNode === container
143 );
144 });
145 }
146
147 /**
148 * Drag start handler

Callers 2

indexMethod · 0.95
[onDragOverContainer]Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected