We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8c8959 commit d9c8ee0Copy full SHA for d9c8ee0
src/cdk-experimental/drag-drop/drop.ts
@@ -291,11 +291,9 @@ export class CdkDrop<T = any> implements OnInit, OnDestroy {
291
})
292
.sort((a, b) => a.clientRect.top - b.clientRect.top);
293
294
- // TODO(crisbeto): add filter here that ensures that the
295
- // current container isn't being passed to itself.
296
this._positionCache.siblings = this.connectedTo
297
.map(drop => typeof drop === 'string' ? this._dragDropRegistry.getDropContainer(drop)! : drop)
298
- .filter(Boolean)
+ .filter(drop => drop && drop !== this)
299
.map(drop => ({drop, clientRect: drop.element.nativeElement.getBoundingClientRect()}));
300
}
301
0 commit comments