Skip to content

Commit 806c98c

Browse files
authored
Merge pull request #7041 from IgniteUI/sstoychev/ref-int-tests-90
refactor(hierarchicalgrid): test refactoring, typos - 9.0
2 parents 57ab2da + e35e487 commit 806c98c

File tree

10 files changed

+469
-689
lines changed

10 files changed

+469
-689
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4365,7 +4365,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
43654365
* @hidden @internal
43664366
*/
43674367
public get outerWidth() {
4368-
return this.hasVerticalSroll() ? this.calcWidth + this.scrollWidth : this.calcWidth;
4368+
return this.hasVerticalScroll() ? this.calcWidth + this.scrollWidth : this.calcWidth;
43694369
}
43704370

43714371
/**
@@ -4458,7 +4458,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
44584458
width = this.getColumnWidthSum();
44594459
}
44604460

4461-
if (this.hasVerticalSroll() && this.width !== null) {
4461+
if (this.hasVerticalScroll() && this.width !== null) {
44624462
width -= this.scrollWidth;
44634463
}
44644464
if ((Number.isFinite(width) || width === null) && width !== this.calcWidth) {
@@ -4489,7 +4489,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
44894489
/**
44904490
* @hidden @internal
44914491
*/
4492-
public hasVerticalSroll() {
4492+
public hasVerticalScroll() {
44934493
if (this._init) { return false; }
44944494
const isScrollable = this.verticalScrollContainer ? this.verticalScrollContainer.isScrollable() : false;
44954495
return !!(this.calcWidth && this.dataView &&
@@ -4577,7 +4577,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
45774577
*/
45784578
this.resetCaches(recalcFeatureWidth);
45794579
this.cdr.detectChanges();
4580-
const hasScroll = this.hasVerticalSroll();
4580+
const hasScroll = this.hasVerticalScroll();
45814581
this.calculateGridWidth();
45824582
this.resetCaches(recalcFeatureWidth);
45834583
this.cdr.detectChanges();
@@ -4593,7 +4593,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
45934593

45944594
this.cdr.detectChanges();
45954595
// in case scrollbar has appeared recalc to size correctly.
4596-
if (hasScroll !== this.hasVerticalSroll()) {
4596+
if (hasScroll !== this.hasVerticalScroll()) {
45974597
this.calculateGridWidth();
45984598
this.cdr.detectChanges();
45994599
}
@@ -4616,7 +4616,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
46164616
let width = this._width;
46174617
if (width === null) {
46184618
let currentWidth = this.calcWidth;
4619-
if (this.hasVerticalSroll()) {
4619+
if (this.hasVerticalScroll()) {
46204620
currentWidth += this.scrollWidth;
46214621
}
46224622
width = currentWidth + 'px';
@@ -4655,8 +4655,8 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
46554655
protected getUnpinnedWidth(takeHidden = false) {
46564656
let width = this.isPercentWidth ?
46574657
this.calcWidth :
4658-
parseInt(this.width, 10) || parseInt(this.hostWidth, 10) || this.calcWidth;
4659-
if (this.hasVerticalSroll() && !this.isPercentWidth) {
4658+
parseInt(this.width, 10) || parseInt(this.hostWidth, 10) || this.calcWidth;
4659+
if (this.hasVerticalScroll() && !this.isPercentWidth) {
46604660
width -= this.scrollWidth;
46614661
}
46624662
return width - this.getPinnedWidth(takeHidden);

projects/igniteui-angular/src/lib/grids/grid/grid.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
</div>
9090
<span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="headerContainer" [attr.droppable]="true"
9191
id="right" class="igx-grid__scroll-on-drag-right"></span>
92-
<div class="igx-grid__thead-thumb" [hidden]='!hasVerticalSroll()' [style.width.px]="scrollWidth"></div>
92+
<div class="igx-grid__thead-thumb" [hidden]='!hasVerticalScroll()' [style.width.px]="scrollWidth"></div>
9393
</div>
9494

9595
<div igxGridBody (keydown.control.c)="copyHandlerIE()" (copy)="copyHandler($event)" class="igx-grid__tbody">
@@ -164,7 +164,7 @@
164164
</div>
165165
<span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="headerContainer" [attr.droppable]="true"
166166
id="right" class="igx-grid__scroll-on-drag-right"></span>
167-
<div [hidden]='!hasVerticalSroll()' class="igx-grid__tbody-scrollbar" [style.width.px]="scrollWidth"
167+
<div [hidden]='!hasVerticalScroll()' class="igx-grid__tbody-scrollbar" [style.width.px]="scrollWidth"
168168
[style.height.px]='calcHeight'>
169169
<ng-template igxGridFor [igxGridForOf]='[]' #verticalScrollHolder></ng-template>
170170
</div>
@@ -177,7 +177,7 @@
177177
[summaries]="id | igxGridSummaryDataPipe:summaryService.retriggerRootPipe" [index]="0"
178178
class="igx-grid__summaries" #summaryRow>
179179
</igx-grid-summary-row>
180-
<div class="igx-grid__tfoot-thumb" [hidden]='!hasVerticalSroll()' [style.height.px]='summariesHeight'
180+
<div class="igx-grid__tfoot-thumb" [hidden]='!hasVerticalScroll()' [style.height.px]='summariesHeight'
181181
[style.width.px]="scrollWidth"></div>
182182
</div>
183183

projects/igniteui-angular/src/lib/grids/grid/grid.multi-row-layout.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ describe('IgxGrid - multi-row-layout #grid', () => {
10791079

10801080
const rows = fixture.debugElement.query(By.css('.igx-grid__tbody')).queryAll(By.css('igx-grid-row'));
10811081
expect(rows.length).toEqual(4);
1082-
expect(grid.hasVerticalSroll()).toBeTruthy();
1082+
expect(grid.hasVerticalScroll()).toBeTruthy();
10831083

10841084
const verticalVirt = grid.verticalScrollContainer;
10851085

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
</div>
6868
<span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="headerContainer" [attr.droppable]="true"
6969
id="right" class="igx-grid__scroll-on-drag-right"></span>
70-
<div class="igx-grid__thead-thumb" [hidden]='!hasVerticalSroll()' [style.width.px]="scrollWidth"></div>
70+
<div class="igx-grid__thead-thumb" [hidden]='!hasVerticalScroll()' [style.width.px]="scrollWidth"></div>
7171
</div>
7272

7373
<div igxGridBody (keydown.control.c)="copyHandlerIE()" (copy)="copyHandler($event)" class="igx-grid__tbody">
@@ -119,7 +119,7 @@
119119
</div>
120120
<span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="headerContainer" [attr.droppable]="true"
121121
id="right" class="igx-grid__scroll-on-drag-right"></span>
122-
<div [hidden]='!hasVerticalSroll()' class="igx-grid__tbody-scrollbar" [style.width.px]="scrollWidth"
122+
<div [hidden]='!hasVerticalScroll()' class="igx-grid__tbody-scrollbar" [style.width.px]="scrollWidth"
123123
[style.height.px]='calcHeight'>
124124
<ng-template igxGridFor [igxGridForOf]='[]' #verticalScrollHolder></ng-template>
125125
</div>
@@ -132,7 +132,7 @@
132132
[summaries]="id | igxGridSummaryDataPipe:summaryService.retriggerRootPipe" [index]="0"
133133
class="igx-grid__summaries" #summaryRow>
134134
</igx-grid-summary-row>
135-
<div class="igx-grid__tfoot-thumb" [hidden]='!hasVerticalSroll()' [style.height.px]='summariesHeight'
135+
<div class="igx-grid__tfoot-thumb" [hidden]='!hasVerticalScroll()' [style.height.px]='summariesHeight'
136136
[style.width.px]="scrollWidth"></div>
137137
</div>
138138

0 commit comments

Comments
 (0)