Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(renderer): dynamic views can't be prepended
  • Loading branch information
edusperoni committed Sep 21, 2020
commit 02fa2bb88b0ef19dcaccb14de3dc270303dbe1c8
6 changes: 5 additions & 1 deletion nativescript-angular/view-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export class ViewUtil {
const extendedParent = this.ensureNgViewExtensions(parent);
const extendedChild = this.ensureNgViewExtensions(child);

if (!previous) {
// the element should be between previous and next
// if there's next but no previous, it's the first element
// if there's previous but no next, it's the last element
// elements that have no previous/next elements must be appended
if (!previous && !next) {
previous = extendedParent.lastChild;
}
this.addToQueue(extendedParent, extendedChild, previous, next);
Expand Down