mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(drag-drop): update root element if selector changes (#14426)
Currently the root element is only resolved once on init, however since it's an input, it could change. These changes add some logic to keep the element up to date.
This commit is contained in:
committed by
Jeremy Elbourn
parent
ecaec183de
commit
14b90db522
+2
-1
@@ -6,7 +6,7 @@ export declare const CDK_DROP_LIST: InjectionToken<CdkDropListContainer<any>>;
|
||||
|
||||
export declare const CDK_DROP_LIST_CONTAINER: InjectionToken<CdkDropListContainer<any>>;
|
||||
|
||||
export declare class CdkDrag<T = any> implements AfterViewInit, OnDestroy {
|
||||
export declare class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {
|
||||
_dragRef: DragRef<CdkDrag<T>>;
|
||||
_handles: QueryList<CdkDragHandle>;
|
||||
_placeholderTemplate: CdkDragPlaceholder;
|
||||
@@ -31,6 +31,7 @@ export declare class CdkDrag<T = any> implements AfterViewInit, OnDestroy {
|
||||
getPlaceholderElement(): HTMLElement;
|
||||
getRootElement(): HTMLElement;
|
||||
ngAfterViewInit(): void;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
ngOnDestroy(): void;
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user