Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
dotCMS/core#20519 : Including code changes in the 21.06.2 LTS Release
Browse files Browse the repository at this point in the history
  • Loading branch information
swicken-dotcms committed Aug 11, 2021
1 parent e340405 commit 2422e1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Expand Up @@ -106,20 +106,21 @@ export class DotLayoutGrid {
}

removeContainer(index: number): void {
const classIndex = this.dotLayoutGridBoxs[index].config.row - 1;
this.dotLayoutGridBoxs.splice(index, 1);
this.deleteEmptyRows();
this.setRowClases();
this.setRowClases(classIndex);
}

private setRowClases(): void {
private setRowClases(classIndex?: number): void {
const newNRows = this.dotLayoutGridBoxs
.map((box: DotLayoutGridBox) => box.config.row)
.reduce((before: number, current: number) => {
return before > current ? before : current;
}, 0);

if (this.rowClasses.length > newNRows) {
this.rowClasses = this.rowClasses.splice(0, this.rowClasses.length - newNRows);
this.rowClasses.splice(classIndex, 1);
} else {
this.rowClasses = [
...this.rowClasses,
Expand Down
6 changes: 6 additions & 0 deletions hotfix_tracking.md
@@ -0,0 +1,6 @@
#DOTCMS_CORE-WEB


This maintenance release includes the following code fixes:

1. https://github.com/dotCMS/core/issues/20519 : Class in rows are lost when you remove a row #20519

0 comments on commit 2422e1d

Please sign in to comment.