Skip to content

Commit 81d7ffb

Browse files
authored
fix(list-view): try to unwrap component views (#33)
1 parent 1dab99c commit 81d7ffb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/angular/src/lib/cdk/list-view/list-view.component.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ export class ListViewComponent<T = any> implements DoCheck, OnDestroy, AfterCont
212212
NativeScriptDebug.listViewLog(`onItemLoading: ${index} - Reusing existing view`);
213213
}
214214

215-
const templateKey = this._viewToTemplate.get(args.view);
215+
let templateKey = this._viewToTemplate.get(args.view);
216+
if (!templateKey && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {
217+
templateKey = this._viewToTemplate.get(args.view.getChildAt(0));
218+
}
216219
if (!templateKey) {
217220
// this template was not created by us
218221
if (NativeScriptDebug.isLogEnabled()) {

0 commit comments

Comments
 (0)