Skip to content

Commit d6638b2

Browse files
committed
fix: Apply offset logic to correct grid type
Signed-off-by: Akshat Patel <[email protected]>
1 parent f41b2d7 commit d6638b2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/grid/column.directive.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ export class ColumnDirective implements OnInit, OnChanges, OnDestroy {
8989
try {
9090
this._columnClasses = [];
9191
const columnKeys = Object.keys(this.columnNumbers);
92-
console.log(columnKeys);
9392

9493
// Assign classes based on the type of grid used.
9594
if (this.isCssGrid) {
@@ -130,7 +129,7 @@ export class ColumnDirective implements OnInit, OnChanges, OnDestroy {
130129
});
131130

132131
Object.keys(this.offsets).forEach(key => {
133-
this._columnClasses.push(`cds--${key}:col-start${this.offsets[key]}`);
132+
this._columnClasses.push(`cds--${key}:col-start${this.offsets[key] + 1}`);
134133
});
135134
} else {
136135
// Set column classes for flex grid
@@ -147,7 +146,7 @@ export class ColumnDirective implements OnInit, OnChanges, OnDestroy {
147146
});
148147

149148
Object.keys(this.offsets).forEach(key => {
150-
this._columnClasses.push(`cds--start-${key}-${this.offsets[key] + 1}`);
149+
this._columnClasses.push(`cds--offset-${key}-${this.offsets[key]}`);
151150
});
152151
}
153152
} catch (err) {

0 commit comments

Comments
 (0)