Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class RowDetailViewExtension implements Extension {

/** Redraw the necessary View Component */
redrawViewComponent(createdView: CreatedView) {
const containerElements = document.getElementsByClassName(`${ROW_DETAIL_CONTAINER_PREFIX}${createdView[this.datasetIdPropName]}`);
const containerElements = document.getElementsByClassName(`${ROW_DETAIL_CONTAINER_PREFIX}${createdView.id}`);
if (containerElements && containerElements.length) {
this.renderViewModel(createdView.dataContext);
}
Expand Down Expand Up @@ -271,7 +271,7 @@ export class RowDetailViewExtension implements Extension {
parent: this.rowDetailViewOptions && this.rowDetailViewOptions.parent,
});

const viewObj = this._views.find((obj) => obj[this.datasetIdPropName] === item[this.datasetIdPropName]);
const viewObj = this._views.find(obj => obj.id === item[this.datasetIdPropName]);
if (viewObj) {
viewObj.componentRef = componentOutput.componentRef;
}
Expand Down Expand Up @@ -352,7 +352,7 @@ export class RowDetailViewExtension implements Extension {
addToArrayWhenNotExists(this._views, viewInfo, idPropName);
} else {
// collapsing, so dispose of the View/Component
const foundViewIndex = this._views.findIndex((view: CreatedView) => view[this.datasetIdPropName] === args.item[this.datasetIdPropName]);
const foundViewIndex = this._views.findIndex((view: CreatedView) => view.id === args.item[this.datasetIdPropName]);
if (foundViewIndex >= 0 && this._views.hasOwnProperty(foundViewIndex)) {
const compRef = this._views[foundViewIndex].componentRef;
this.appRef.detachView(compRef.hostView);
Expand All @@ -366,7 +366,7 @@ export class RowDetailViewExtension implements Extension {
private onRowBackToViewportRange(e: Event, args: { grid: any; item: any; rowId: number; rowIndex: number; expandedRows: any[]; rowIdsOutOfViewport: number[]; }) {
if (args && args.item) {
this._views.forEach((view) => {
if (view[this.datasetIdPropName] === args.item[this.datasetIdPropName]) {
if (view.id === args.item[this.datasetIdPropName]) {
this.redrawViewComponent(view);
}
});
Expand Down