Skip to content

Commit

Permalink
Merge branch '13.1.x' into vkombov/fix-10619-13.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
teodosiah authored Mar 29, 2022
2 parents 9aa8639 + 1f896eb commit fb46410
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@
) {
$header-year: map.get($categories, 'header-year');
$header-date: map.get($categories, 'header-date');
$weekday-label: map.get($categories, 'weekday-labels');
$weekday-label: map.get($categories, 'weekday-label');
$picker-date: map.get($categories, 'picker-date');
$content: map.get($categories, 'content');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
) {
$title: map.get($categories, 'title');
$description: map.get($categories, 'description');
$body: map.get($categories, '$body');
$body: map.get($categories, 'body');

%igx-expansion-panel__header-title {
@include type-style($type-scale, $title) {
Expand Down
16 changes: 10 additions & 6 deletions projects/igniteui-angular/src/lib/grids/grid-base.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5964,18 +5964,22 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
console.warn('The record cannot be added as a child to an unspecified record.');
return;
}
index = 0;
index = null;
} else {
// find the index of the record with that PK
index = this.gridAPI.get_rec_index_by_id(rowID, this.dataView);
rowID = index;
if (index === -1) {
console.warn('No row with the specified ID was found.');
return;
}
}

this._addRowForIndex(index, asChild);
}

protected _addRowForIndex(index: number, asChild?: boolean) {
if (!this.dataView.length) {
this.beginAddRowForIndex(rowID, asChild);
this.beginAddRowForIndex(index, asChild);
return;
}
// check if the index is valid - won't support anything outside the data view
Expand All @@ -5987,13 +5991,13 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
this.verticalScrollContainer.chunkLoad
.pipe(first(), takeUntil(this.destroy$))
.subscribe(() => {
this.beginAddRowForIndex(rowID, asChild);
this.beginAddRowForIndex(index, asChild);
});
this.navigateTo(index);
this.notifyChanges(true);
return;
}
this.beginAddRowForIndex(rowID, asChild);
this.beginAddRowForIndex(index, asChild);
} else {
console.warn('The row with the specified PK or index is outside of the current data view.');
}
Expand All @@ -6014,7 +6018,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
if (index === 0) {
return this.beginAddRowById(null);
}
return this.beginAddRowById(this.gridAPI.get_rec_id_by_index(index - 1, this.dataView));
return this._addRowForIndex(index - 1);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ export class IgxTreeGridComponent extends IgxGridBaseDirective implements GridTy
if (index === null || index < 0) {
return this.beginAddRowById(null, asChild);
}
return this.beginAddRowById(this.gridAPI.get_rec_id_by_index(index, this.dataView), asChild);
return this._addRowForIndex(index - 1, asChild);
}

/**
Expand Down

0 comments on commit fb46410

Please sign in to comment.