Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 1ded6be

Browse files
committed
chore: add more Cypress tests and fix Vue Row Detail
1 parent e56d435 commit 1ded6be

File tree

3 files changed

+466
-413
lines changed

3 files changed

+466
-413
lines changed

src/app/examples/grid45.component.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ <h2>
8484
Use Inner Grid State/Presets
8585
</span>
8686
</label>
87+
88+
<label class="checkbox-inline control-label ms-2" for="useResizeAutoHeight">
89+
<input
90+
type="checkbox"
91+
id="useResizeAutoHeight"
92+
data-test="use-auto-height"
93+
[checked]="isUsingAutoHeight"
94+
(click)="changeUsingResizerAutoHeight()"
95+
/>
96+
Use <code>autoResize.autoHeight</code>
97+
</label>
8798
</span>
8899
</div>
89100
</div>

src/app/examples/grid45.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export class Grid45Component implements OnDestroy, OnInit {
2222
detailViewRowCount = 9;
2323
showSubTitle = true;
2424
isUsingInnerGridStatePresets = false;
25+
isUsingAutoHeight = false;
2526
serverWaitDelay = FAKE_SERVER_DELAY;
2627

2728
get rowDetailInstance(): SlickRowDetailView {
@@ -100,7 +101,7 @@ export class Grid45Component implements OnDestroy, OnInit {
100101
this.gridOptions = {
101102
autoResize: {
102103
container: '#demo-container',
103-
autoHeight: false, // works with/without autoHeight
104+
autoHeight: this.isUsingAutoHeight, // works with/without autoHeight
104105
bottomPadding: 20,
105106
},
106107
autoHeight: false,
@@ -160,6 +161,15 @@ export class Grid45Component implements OnDestroy, OnInit {
160161
return true;
161162
}
162163

164+
changeUsingResizerAutoHeight() {
165+
this.isUsingAutoHeight = !this.isUsingAutoHeight;
166+
this.angularGrid.slickGrid?.setOptions({
167+
autoResize: { ...this.gridOptions.autoResize, autoHeight: this.isUsingAutoHeight },
168+
});
169+
this.angularGrid.resizerService.resizeGrid();
170+
return true;
171+
}
172+
163173
closeAllRowDetail() {
164174
this.rowDetailInstance?.collapseAll();
165175
}

0 commit comments

Comments
 (0)