Skip to content

Commit 20d2449

Browse files
authored
Merge branch '8.1.x' into mkirova/fix-4520-8.1.x
2 parents 7f3206d + 28db3ad commit 20d2449

23 files changed

+214
-58
lines changed

projects/igniteui-angular/src/lib/buttonGroup/buttonGroup.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
279279

280280
/**
281281
* Selects a button by its index.
282-
* @memberOf {@link IgxButtonGroupComponent}
283282
*```typescript
284283
*@ViewChild("MyChild")
285284
*private buttonG: IgxButtonGroupComponent;
@@ -288,6 +287,7 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
288287
* this.cdr.detectChanges();
289288
*}
290289
*```
290+
* @memberOf {@link IgxButtonGroupComponent}
291291
*/
292292
public selectButton(index: number) {
293293
if (index >= this.buttons.length || index < 0) {
@@ -326,7 +326,6 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
326326

327327
/**
328328
* Deselects a button by its index.
329-
* @memberOf {@link IgxButtonGroupComponent}
330329
* ```typescript
331330
*@ViewChild("MyChild")
332331
*private buttonG: IgxButtonGroupComponent;
@@ -335,6 +334,7 @@ export class IgxButtonGroupComponent extends DisplayDensityBase implements After
335334
* this.cdr.detectChanges();
336335
*}
337336
* ```
337+
* @memberOf {@link IgxButtonGroupComponent}
338338
*/
339339
public deselectButton(index: number) {
340340
if (index >= this.buttons.length || index < 0) {

projects/igniteui-angular/src/lib/combo/combo.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<ng-container ngProjectAs="igx-hint, [igxHint]">
2525
<ng-content select="igx-hint, [igxHint]"></ng-content>
2626
</ng-container>
27-
<input igxInput #comboInput name="comboInput" type="text" [value]="value" readonly [placeholder]="placeholder"
27+
<input igxInput #comboInput name="comboInput" type="text" [value]="value" readonly [attr.placeholder]="placeholder"
2828
[disabled]="disabled" (blur)="onBlur()" />
2929
<ng-container ngProjectAs="igx-suffix">
3030
<ng-content select="igx-suffix"></ng-content>
@@ -47,7 +47,7 @@
4747
<igx-input-group *ngIf="displaySearchInput" [displayDensity]="displayDensity" class="igx-combo__search">
4848
<input class="igx-combo-input" igxInput #searchInput name="searchInput" autocomplete="off" type="text"
4949
[(ngModel)]="searchValue" (ngModelChange)="handleInputChange($event)" (keyup)="handleKeyUp($event)"
50-
(keydown)="handleKeyDown($event)" (focus)="dropdown.onBlur($event)" [placeholder]="searchPlaceholder"
50+
(keydown)="handleKeyDown($event)" (focus)="dropdown.onBlur($event)" [attr.placeholder]="searchPlaceholder"
5151
aria-autocomplete="both" [attr.aria-owns]="dropdown.id" [attr.aria-labelledby]="ariaLabelledBy" />
5252
</igx-input-group>
5353
<ng-container *ngTemplateOutlet="headerTemplate">

projects/igniteui-angular/src/lib/combo/combo.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
683683
* ```
684684
*/
685685
@Input()
686-
public placeholder = '';
686+
public placeholder;
687687

688688
/**
689689
* @hidden @internal

projects/igniteui-angular/src/lib/core/styles/components/grid/_excel-filtering-theme.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
/// @requires --var
1313
@mixin _excel-filtering($theme, $palette) {
1414
%grid-excel-filter {
15-
height: rem(15px);
1615
display: block;
1716
}
1817

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,19 @@ describe('IgxForOf directive -', () => {
255255
}
256256
});
257257

258+
it('should not throw error when itemSize is changed while data is null/undefined.', () => {
259+
let errorMessage = '';
260+
fix.componentInstance.data = null;
261+
fix.detectChanges();
262+
try {
263+
fix.componentInstance.itemSize = '100px';
264+
fix.detectChanges();
265+
} catch (ex) {
266+
errorMessage = ex.message;
267+
}
268+
expect(errorMessage).toBe('');
269+
});
270+
258271
it('should allow initially undefined value for igxForOf and then detect changes correctly once the value is updated', async () => {
259272
fix = TestBed.createComponent(VerticalVirtualNoDataComponent);
260273
expect(() => {

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
423423
}
424424
}
425425
const defaultItemSize = 'igxForItemSize';
426-
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange && this.igxForScrollOrientation === 'vertical') {
426+
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&
427+
this.igxForScrollOrientation === 'vertical' && this.igxForOf) {
427428
// handle default item size changed.
428429
this.initSizesCache(this.igxForOf);
429430
this._applyChanges();
@@ -443,7 +444,7 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
443444
if (changes) {
444445
// re-init cache.
445446
if (!this.igxForOf) {
446-
return;
447+
this.igxForOf = [];
447448
}
448449
this._updateSizeCache();
449450
this._zone.run(() => {
@@ -1325,7 +1326,8 @@ export class IgxGridForOfDirective<T> extends IgxForOfDirective<T> implements On
13251326
}
13261327
}
13271328
const defaultItemSize = 'igxForItemSize';
1328-
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange && this.igxForScrollOrientation === 'vertical') {
1329+
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&
1330+
this.igxForScrollOrientation === 'vertical' && this.igxForOf) {
13291331
// handle default item size changed.
13301332
this.initSizesCache(this.igxForOf);
13311333
}
@@ -1486,7 +1488,7 @@ export class IgxGridForOfDirective<T> extends IgxForOfDirective<T> implements On
14861488
this.onDataChanging.emit(args);
14871489
// re-init cache.
14881490
if (!this.igxForOf) {
1489-
return;
1491+
this.igxForOf = [];
14901492
}
14911493
/* we need to reset the master dir if all rows are removed
14921494
(e.g. because of filtering); if all columns are hidden, rows are

projects/igniteui-angular/src/lib/grids/cell.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,10 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
437437
}
438438
} else {
439439
const rowTransaction: State = this.grid.transactions.getState(this.row.rowID);
440-
return rowTransaction && rowTransaction.value && rowTransaction.value[this.column.field];
440+
return rowTransaction && rowTransaction.value &&
441+
(rowTransaction.value[this.column.field] ||
442+
rowTransaction.value[this.column.field] === 0 ||
443+
rowTransaction.value[this.column.field] === false);
441444
}
442445

443446
return false;

projects/igniteui-angular/src/lib/grids/column.component.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy {
616616
/**
617617
* Gets the column `sortStrategy`.
618618
* ```typescript
619-
* let sortStrategy = this.column.sortStrategy'
619+
* let sortStrategy = this.column.sortStrategy
620620
* ```
621621
* @memberof IgxColumnComponent
622622
*/
@@ -628,10 +628,7 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy {
628628
* Sets the column `sortStrategy`.
629629
* ```typescript
630630
* this.column.sortStrategy = new CustomSortingStrategy().
631-
*
632-
* class CustomSortingStrategy extends SortingStrategy {
633-
* ...
634-
* }
631+
* class CustomSortingStrategy extends SortingStrategy {...}
635632
* ```
636633
* @memberof IgxColumnComponent
637634
*/
@@ -1557,7 +1554,6 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy {
15571554
* Autosize the column to the longest currently visible cell value, including the header cell.
15581555
* ```typescript
15591556
* @ViewChild('grid') grid: IgxGridComponent;
1560-
*
15611557
* let column = this.grid.columnList.filter(c => c.field === 'ID')[0];
15621558
* column.autosize();
15631559
* ```

projects/igniteui-angular/src/lib/grids/filtering/excel-style/grid.excel-style-filtering.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import {
1414
import {
1515
HorizontalAlignment,
1616
VerticalAlignment,
17-
ConnectedPositioningStrategy,
1817
OverlaySettings,
1918
IgxOverlayService,
20-
AbsoluteScrollStrategy
19+
AbsoluteScrollStrategy,
20+
AutoPositionStrategy
2121
} from '../../../services/index';
2222
import { IgxFilteringService, ExpressionUI } from '../grid-filtering.service';
2323
import { IgxToggleDirective } from '../../../directives/toggle/toggle.directive';
@@ -115,7 +115,7 @@ export class IgxGridExcelStyleFilteringComponent implements OnDestroy, OnInit, A
115115
private _subMenuOverlaySettings: OverlaySettings = {
116116
closeOnOutsideClick: true,
117117
modal: false,
118-
positionStrategy: new ConnectedPositioningStrategy(this._subMenuPositionSettings),
118+
positionStrategy: new AutoPositionStrategy(this._subMenuPositionSettings),
119119
scrollStrategy: new AbsoluteScrollStrategy()
120120
};
121121

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,14 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
445445

446446
/**
447447
* Sets the current page index.
448+
* ```html
448449
* <igx-grid #grid [data]="Data" [paging]="true" [page]="5" [autoGenerate]="true"></igx-grid>
450+
*```
451+
* Two-way data binding.
452+
* ```html
453+
* <igx-grid #grid [data]="Data" [paging]="true" [(page)]="model.page" [autoGenerate]="true"></igx-grid>
454+
* ```
455+
* @memberof IgxGridBaseComponent
449456
*/
450457
set page(val: number) {
451458
if (val === this._page || val < 0 || val > this.totalPages - 1) {
@@ -2017,7 +2024,8 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
20172024
* for the built-in column hiding UI of the`IgxColumnComponent`.
20182025
* ```typescript
20192026
* const hiddenColText = this.grid.hiddenColumnsText;
2020-
* ``
2027+
* ```
2028+
* @memberof IgxGridBaseComponent
20212029
*/
20222030
@WatchChanges()
20232031
@Input()
@@ -3845,7 +3853,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
38453853
* Returns how many times the grid contains the string.
38463854
* ```typescript
38473855
* this.grid.findPrev("financial");
3848-
* ````
3856+
* ```
38493857
* @param text the string to search.
38503858
* @param caseSensitive optionally, if the search should be case sensitive (defaults to false).
38513859
* @param exactMatch optionally, if the text should match the entire value (defaults to false).

0 commit comments

Comments
 (0)