Skip to content

Commit a72de2d

Browse files
authored
Merge branch '20.0.x' into rivanova/fix-15848-master
2 parents 12455ea + 9953ebd commit a72de2d

15 files changed

+179
-66
lines changed

projects/igniteui-angular/src/lib/core/styles/components/drop-down/_drop-down-theme.scss

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -299,20 +299,16 @@
299299
bottom: 0;
300300
}
301301

302-
igx-icon {
302+
igx-icon,
303+
igc-icon {
303304
justify-content: center;
304-
--component-size: 1;
305-
306-
@if $variant == 'fluent' {
307-
--component-size: 3;
308-
}
309305

310306
@if $variant == 'indigo' {
311307
$icon-size: sizable(rem(14px), rem(16px), rem(16px));
312308

313-
width: var(--ig-icon-size, $icon-size);
314-
height: var(--ig-icon-size, $icon-size);
315-
font-size: var(--ig-icon-size, $icon-size);
309+
--size: #{$icon-size};
310+
} @else {
311+
--component-size: 1;
316312
}
317313
}
318314
}

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

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -456,12 +456,12 @@
456456

457457
@if not($grid-shadow) {
458458
$grid-elevation: map.get($grid-schema, 'grid-elevation');
459-
$grid-shadow: elevation(var(--grid-elevation));
459+
$grid-shadow: elevation($grid-elevation);
460460
}
461461

462462
@if not($drag-shadow) {
463463
$drag-elevation: map.get($grid-schema, 'drag-elevation');
464-
$drag-shadow: elevation(var(--drag-elevation));
464+
$drag-shadow: elevation($drag-elevation);
465465
}
466466

467467
@if not($drop-area-border-radius) {
@@ -758,8 +758,7 @@
758758
igx-time-picker {
759759
position: relative;
760760
height: calc(100% - #{$editing-outline-width * 2});
761-
width: calc(100% - #{$editing-outline-width * 2}) !important;
762-
inset-inline-start: $editing-outline-width;
761+
width: 100% !important;
763762
overflow: hidden;
764763
}
765764

@@ -1535,6 +1534,9 @@
15351534
}
15361535

15371536
%igx-grid__td--bool {
1537+
display: flex;
1538+
flex-grow: 1;
1539+
15381540
igx-icon {
15391541
--component-size: #{if($variant == 'indigo', 2, 1)};
15401542
}
@@ -1804,7 +1806,6 @@
18041806
padding-inline-end: rem(4px) !important;
18051807

18061808
> igx-icon {
1807-
margin-inline-start: auto;
18081809
color: color($color: 'error');
18091810
width: var(--igx-icon-size, rem(18px));
18101811
height: var(--igx-icon-size, rem(18px));
@@ -1910,11 +1911,10 @@
19101911
%igx-grid__td--editing {
19111912
background: var-get($theme, 'cell-editing-background') !important;
19121913
box-shadow: inset 0 0 0 $editing-outline-width var-get($theme, 'edit-mode-color');
1913-
padding: 0 !important;
1914+
padding-inline: rem(4px);
19141915

19151916
&.igx-grid__td--invalid {
19161917
box-shadow: inset 0 0 0 rem(2px) color($color: 'error') !important;
1917-
padding-inline-end: rem(4px) !important;
19181918
}
19191919

19201920
&%grid-cell-number {
@@ -2105,7 +2105,7 @@
21052105

21062106
.sort-icon {
21072107
color: var-get($theme, 'header-selected-text-color');
2108-
2108+
21092109
::after {
21102110
background: var-get($theme, 'header-selected-background');
21112111
}
@@ -2133,15 +2133,15 @@
21332133
&%igx-grid-th--sorted {
21342134
.sort-icon {
21352135
color: var-get($theme, 'header-selected-text-color');
2136-
2136+
21372137
> igx-icon {
21382138
color: inherit;
21392139
}
21402140

21412141
&:focus,
21422142
&:hover {
21432143
color: var-get($theme, 'header-selected-text-color');
2144-
2144+
21452145
> igx-icon {
21462146
color: inherit;
21472147
}
@@ -2198,14 +2198,14 @@
21982198
.sort-icon {
21992199
opacity: 1;
22002200
color: var-get($theme, 'sorted-header-icon-color');
2201-
2201+
22022202
> igx-icon {
22032203
color: inherit;
22042204
}
22052205

22062206
&:hover {
22072207
color: var-get($theme, 'sortable-header-icon-hover-color');
2208-
2208+
22092209
> igx-icon {
22102210
color: inherit;
22112211
}
@@ -2241,6 +2241,7 @@
22412241
%grid-cell-number {
22422242
text-align: $grid-cell-align-num;
22432243
justify-content: flex-end;
2244+
flex-grow: 1;
22442245

22452246
%grid-cell-header-icons {
22462247
justify-content: flex-start;

projects/igniteui-angular/src/lib/core/styles/components/input/_input-group-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1928,7 +1928,7 @@
19281928
}
19291929

19301930
%indigo--box-focused {
1931-
background: var-get($theme, 'box-background-hover');
1931+
background: var-get($theme, 'box-background-focus');
19321932
}
19331933

19341934
%form-group-bundle--indigo--disabled {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3813,7 +3813,7 @@ export abstract class IgxGridBaseDirective implements GridType,
38133813

38143814
// notifier for column autosize requests
38153815
this._autoSizeColumnsNotify.pipe(
3816-
throttleTime(0, animationFrameScheduler, { leading: false, trailing: true }),
3816+
throttleTime(0, this.platform.isBrowser ? animationFrameScheduler : undefined, { leading: false, trailing: true }),
38173817
destructor
38183818
)
38193819
.subscribe(() => {
@@ -6169,7 +6169,7 @@ export abstract class IgxGridBaseDirective implements GridType,
61696169
* @hidden @internal
61706170
*/
61716171
public trackColumnChanges(_index, col) {
6172-
return col.field + col._calcWidth;
6172+
return col.field + col._calcWidth.toString();
61736173
}
61746174

61756175
/**

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<div
99
igxTextHighlight class="igx-grid__td-text"
1010
[cssClass]="highlightClass"
11+
[class.igx-grid__td--number]="column.dataType === 'number' || column.dataType === 'percent' || column.dataType === 'currency'"
1112
[activeCssClass]="activeHighlightClass"
1213
[groupName]="gridID"
1314
[value]="formatter ? (value | columnFormatter:formatter:rowData)
@@ -32,11 +33,13 @@
3233
}
3334

3435
@if (column.dataType === 'boolean' && !this.formatter) {
36+
<div [class.igx-grid__td--bool]="column.dataType === 'boolean'">
3537
<igx-icon
3638
family="default"
3739
[name]="value ? 'confirm' : 'close'"
3840
[ngClass]="{ 'igx-icon--success': value, 'igx-icon--error': !value }">
3941
</igx-icon>
42+
</div>
4043
}
4144
@if (column.dataType === 'image') {
4245
<img [src]="value" [alt]="value | igxCellImageAlt" />

projects/igniteui-angular/src/lib/grids/grid/grid-validation.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class IgxGridValidationService {
3636
owner: this.grid
3737
};
3838
this.grid.formGroupCreated.emit(args);
39+
formGroup.patchValue(data);
3940
this.add(rowId, formGroup);
4041
} else {
4142
// reset to pristine.

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.spec.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,33 @@ describe('Basic IgxHierarchicalGrid #hGrid', () => {
16851685

16861686
});
16871687

1688+
it('should allow changing row islands runtime in nested child grid.', () => {
1689+
const row = hierarchicalGrid.gridAPI.get_row_by_index(0) as IgxHierarchicalRowComponent;
1690+
UIInteractions.simulateClickAndSelectEvent(row.expander);
1691+
fixture.detectChanges();
1692+
1693+
let childGrid = hierarchicalGrid.gridAPI.getChildGrids()[0];
1694+
const childRow = childGrid.gridAPI.get_row_by_index(0) as IgxHierarchicalRowComponent;
1695+
UIInteractions.simulateClickAndSelectEvent(childRow.expander);
1696+
fixture.detectChanges();
1697+
1698+
let hGrids = fixture.debugElement.queryAll(By.css('igx-hierarchical-grid'));
1699+
expect(hGrids.length).toBe(3);
1700+
expect(childGrid.gridAPI.getChildGrids().length).toBe(1);
1701+
1702+
fixture.componentInstance.toggleRINested = true;
1703+
fixture.detectChanges();
1704+
1705+
const nestedChildGrid = childGrid.gridAPI.getChildGrids()[0];
1706+
const nestedChildRow = nestedChildGrid.gridAPI.get_row_by_index(0) as IgxHierarchicalRowComponent;
1707+
UIInteractions.simulateClickAndSelectEvent(nestedChildRow.expander);
1708+
fixture.detectChanges();
1709+
1710+
hGrids = fixture.debugElement.queryAll(By.css('igx-hierarchical-grid'));
1711+
expect(hGrids.length).toBe(4);
1712+
expect(nestedChildGrid.gridAPI.getChildGrids().length).toBe(1);
1713+
});
1714+
16881715
it(`Should apply template to both parent and child grids`, () => {
16891716
const customFixture = TestBed.createComponent(IgxHierarchicalGridCustomRowEditOverlayComponent);
16901717
customFixture.detectChanges();
@@ -2146,6 +2173,10 @@ export class IgxHierarchicalGridSizingComponent {
21462173
<igx-row-island key="childData" [autoGenerate]="true">
21472174
@if (toggleChildRI) {
21482175
<igx-row-island key="childData" [autoGenerate]="true">
2176+
@if (toggleRINested) {
2177+
<igx-row-island [key]="'childData'" [autoGenerate]="true">
2178+
</igx-row-island>
2179+
}
21492180
</igx-row-island>
21502181
}
21512182
</igx-row-island>
@@ -2156,6 +2187,7 @@ export class IgxHierarchicalGridSizingComponent {
21562187
export class IgxHierarchicalGridToggleRIComponent extends IgxHierarchicalGridTestBaseComponent {
21572188
public toggleRI = true;
21582189
public toggleChildRI = true;
2190+
public toggleRINested = false;
21592191
}
21602192

21612193
@Component({

projects/igniteui-angular/src/lib/grids/hierarchical-grid/row-island.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ export class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective
438438
.subscribe(() => {
439439
this.updateChildren();
440440
// update existing grids since their child ri have been changed.
441-
this.getGridsForIsland(this.key).forEach(grid => {
441+
this.rowIslandAPI.getChildGrids(false).forEach(grid => {
442442
(grid as any).onRowIslandChange(this.children);
443443
});
444444
});

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-data-selector.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import { IgxIconComponent } from "../../icon/icon.component";
4747
import { IgxInputGroupComponent } from "../../input-group/input-group.component";
4848
import { fadeIn, fadeOut } from 'igniteui-angular/animations';
4949
import { Size } from '../common/enums';
50+
import { GridColumnDataType } from '../../data-operations/data-util';
5051

5152
interface IDataSelectorPanel {
5253
name: string;
@@ -541,8 +542,13 @@ export class IgxPivotDataSelectorComponent {
541542
* @internal
542543
*/
543544
public onAggregationChange(event: ISelectionEventArgs) {
545+
544546
if (!this.isSelected(event.newSelection.value)) {
545547
this.value.aggregate = event.newSelection.value;
548+
const isSingleValue = this.grid.values.length === 1;
549+
550+
PivotUtil.updateColumnTypeByAggregator(this.grid.columns, this.value, isSingleValue);
551+
546552
this.grid.pipeTrigger++;
547553
this.grid.cdr.markForCheck();
548554
}

0 commit comments

Comments
 (0)