Skip to content

Commit ca1792f

Browse files
committed
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular into pbozhinov/fix-6850
2 parents 9b222bb + bf899d5 commit ca1792f

File tree

11 files changed

+236
-284
lines changed

11 files changed

+236
-284
lines changed

projects/igniteui-angular/src/lib/core/styles/components/carousel/_carousel-theme.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@
303303
overflow: hidden;
304304
outline-style: none;
305305
border-radius: --var($theme, 'border-radius');
306+
min-height: 300px;
307+
min-width: 300px;
306308
}
307309

308310
%igx-carousel-slide {

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_toast.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ $_bootstrap-toast: extend(
5656
(
5757
variant: 'bootstrap',
5858
background: #fff,
59+
60+
text-color: (
61+
igx-color: ('grays', 600)
62+
)
5963
)
6064
);
6165

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2468,6 +2468,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
24682468
private _unpinnedWidth = NaN;
24692469
private _visibleColumns = [];
24702470
private _columnGroups = false;
2471+
private _autoGeneratedCols = [];
24712472
protected _headerFeaturesWidth = NaN;
24722473

24732474
private _columnWidth: string;
@@ -4549,6 +4550,12 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
45494550
*/
45504551
protected onColumnsChanged(change: QueryList<IgxColumnComponent>) {
45514552
const diff = this.columnListDiffer.diff(change);
4553+
if (this.autoGenerate && this.columnList.length === 0 && this._autoGeneratedCols.length > 0) {
4554+
// In Ivy if there are nested conditional templates the content children are re-evaluated
4555+
// hence autogenerated columns are cleared and need to be reset.
4556+
this.columnList.reset(this._autoGeneratedCols);
4557+
return;
4558+
}
45524559
if (diff) {
45534560
let added = false;
45544561
let removed = false;
@@ -4778,6 +4785,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
47784785
ref.changeDetectorRef.detectChanges();
47794786
columns.push(ref.instance);
47804787
});
4788+
this._autoGeneratedCols = columns;
47814789

47824790
this.columnList.reset(columns);
47834791
if (data && data.length > 0) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
417417
protected onColumnsChanged(change: QueryList<IgxColumnComponent>) {
418418
this.updateColumnList();
419419
const cols = change.filter(c => c.gridAPI.grid === this);
420-
if (cols.length > 0) {
420+
if (cols.length > 0 || this.autoGenerate) {
421421
this.columnList.reset(cols);
422422
super.onColumnsChanged(this.columnList);
423423
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,8 +1080,7 @@ describe('IgxHierarchicalGrid Runtime Row Island change Scenarios #hGrid', () =>
10801080
hierarchicalGrid = fixture.componentInstance.hgrid;
10811081
}));
10821082

1083-
xit('should allow changing row islands runtime in root grid.', () => {
1084-
pending('Related to issue #6731');
1083+
it('should allow changing row islands runtime in root grid.', () => {
10851084
const row = hierarchicalGrid.getRowByIndex(0) as IgxHierarchicalRowComponent;
10861085
UIInteractions.clickElement(row.expander);
10871086
fixture.detectChanges();

projects/igniteui-angular/src/lib/progressbar/circularbar.component.spec.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,15 @@ describe('IgCircularBar', () => {
146146
}));
147147

148148
it('Should update value when we try to decrease it (without animation)', () => {
149-
pending('Related to the bug #6740');
150149
const fixture = TestBed.createComponent(CircularBarComponent);
151150
fixture.detectChanges();
152151

153152
const progressBar = fixture.componentInstance.progressbar;
154153
let expectedValue = 50;
155154

156155
fixture.componentInstance.animate = false;
156+
fixture.detectChanges();
157+
157158
fixture.componentInstance.value = expectedValue;
158159
fixture.detectChanges();
159160

@@ -202,7 +203,12 @@ describe('IgCircularBar', () => {
202203
it('Value should not exceed the lower limit (0) when operating with floating numbers', fakeAsync(() => {
203204
const fix = TestBed.createComponent(CircularBarComponent);
204205
const compInstance = fix.componentInstance;
206+
fix.detectChanges();
207+
tick(tickTime);
208+
205209
compInstance.max = 2.5;
210+
fix.detectChanges();
211+
206212
compInstance.value = -0.3;
207213
fix.detectChanges();
208214

@@ -213,21 +219,24 @@ describe('IgCircularBar', () => {
213219
expect(bar.valueInPercent).toBe(expectedRes);
214220

215221
compInstance.animate = false;
216-
compInstance.value = -2;
222+
fix.detectChanges();
217223

224+
compInstance.value = -2;
218225
fix.detectChanges();
219226

220227
expect(bar.value).toBe(expectedRes);
221228
expect(bar.valueInPercent).toBe(expectedRes);
222229
}));
223230

224231
it('Value should not exceed the max limit when operating with floating numbers', fakeAsync(() => {
225-
pending('Related to the bug #6740');
226232
const fix = TestBed.createComponent(CircularBarComponent);
227233
const compInstance = fix.componentInstance;
228234
let value = 2.67;
229235
const max = 2.5;
236+
230237
compInstance.max = max;
238+
fix.detectChanges();
239+
231240
compInstance.value = value;
232241
fix.detectChanges();
233242

@@ -238,9 +247,11 @@ describe('IgCircularBar', () => {
238247

239248
value = 3.01;
240249
compInstance.animate = false;
241-
compInstance.value = value;
250+
fix.detectChanges();
242251

252+
compInstance.value = value;
243253
fix.detectChanges();
254+
244255
expect(bar.value).toBe(max);
245256
expect(bar.valueInPercent).toBe(100);
246257
}));
@@ -307,7 +318,6 @@ describe('IgCircularBar', () => {
307318
}));
308319

309320
it('should apply its template correctly', () => {
310-
pending('Related to the bug #6740');
311321
const fixture = TestBed.createComponent(CircularBarTemplateComponent);
312322
fixture.detectChanges();
313323

projects/igniteui-angular/src/lib/progressbar/linearbar.component.spec.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ describe('IgLinearBar', () => {
172172
}));
173173

174174
it('Should update value when we try to decrease it (without animation)', () => {
175-
pending('Related to the bug #6740');
176175
const fixture = TestBed.createComponent(LinearBarComponent);
177176
const progressBar = fixture.componentInstance.progressbar;
178177
let expectedValue = 50;
@@ -227,32 +226,40 @@ describe('IgLinearBar', () => {
227226
it('Value should not exceed the lower limit (0) when operating with floating numbers', fakeAsync(() => {
228227
const fix = TestBed.createComponent(LinearBarComponent);
229228
const compInstance = fix.componentInstance;
229+
fix.detectChanges();
230+
tick(tickTime);
231+
230232
compInstance.max = 2.5;
231-
compInstance.value = -0.3;
232233
fix.detectChanges();
233234

235+
compInstance.value = -0.3;
236+
fix.detectChanges();
234237
tick(tickTime);
238+
235239
const bar = compInstance.progressbar;
236240
const expectedRes = 0;
237241
expect(bar.value).toBe(expectedRes);
238242
expect(bar.valueInPercent).toBe(expectedRes);
239243

240244
compInstance.animate = false;
241-
compInstance.value = -2;
245+
fix.detectChanges();
242246

247+
compInstance.value = -2;
243248
fix.detectChanges();
244249

245250
expect(bar.value).toBe(expectedRes);
246251
expect(bar.valueInPercent).toBe(expectedRes);
247252
}));
248253

249254
it('Value should not exceed the max limit when operating with floating numbers', fakeAsync(() => {
250-
pending('Related to the bug #6740');
251255
const fix = TestBed.createComponent(LinearBarComponent);
252256
const compInstance = fix.componentInstance;
253257
let value = 2.67;
254258
const max = 2.5;
259+
255260
compInstance.max = max;
261+
fix.detectChanges();
262+
256263
compInstance.value = value;
257264
fix.detectChanges();
258265

@@ -263,9 +270,11 @@ describe('IgLinearBar', () => {
263270

264271
value = 3.01;
265272
compInstance.animate = false;
266-
compInstance.value = value;
273+
fix.detectChanges();
267274

275+
compInstance.value = value;
268276
fix.detectChanges();
277+
269278
expect(bar.value).toBe(max);
270279
expect(bar.valueInPercent).toBe(100);
271280
}));

0 commit comments

Comments
 (0)