Skip to content

Commit 0f0e710

Browse files
Merge branch '18.2.x' into ikitanov/fix-15306-18.2.x
2 parents 2f0c9ef + 8a0cacd commit 0f0e710

File tree

6 files changed

+145
-30
lines changed

6 files changed

+145
-30
lines changed

projects/igniteui-angular/src/lib/calendar/days-view/day-item.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ export class IgxDayItemComponent {
111111
@HostBinding('class.igx-days-view__date--selected')
112112
public get isSelectedCSS(): boolean {
113113
const selectable =
114-
!this.isInactive || (this.isWithinRange && this.selection === "range");
114+
!this.isInactive || this.isWithinPreviewRange ||
115+
(this.isWithinRange && this.selection === "range");
115116
return !this.isDisabled && selectable && this.selected;
116117
}
117118

projects/igniteui-angular/src/lib/core/styles/components/calendar/_calendar-theme.scss

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@
11581158
display: flex;
11591159
justify-content: space-between;
11601160

1161-
@if $variant != 'indigo' {
1161+
@if $variant == 'bootstrap' {
11621162
&:nth-child(2) {
11631163
%date-inner-week-number {
11641164
border-start-start-radius: var-get($theme, 'week-number-border-radius');
@@ -1222,28 +1222,6 @@
12221222
}
12231223
}
12241224

1225-
%date-inner-week-number {
1226-
min-width: auto;
1227-
width: $date-size;
1228-
color: var-get($theme, 'week-number-foreground');
1229-
background: var-get($theme, 'week-number-background');
1230-
1231-
&::after {
1232-
display: none !important;
1233-
}
1234-
1235-
&::before {
1236-
content: '';
1237-
position: absolute;
1238-
background: var-get($theme, 'week-number-background');
1239-
//border-inline: rem(1px) solid var-get($theme, 'week-number-background');
1240-
inset-inline-start: rem(-1px);
1241-
inset-block-start: 100%;
1242-
height: calc($date-size / 2);
1243-
width: $date-size;
1244-
}
1245-
}
1246-
12471225
%label-week-number {
12481226
text-align: center;
12491227

@@ -1272,9 +1250,8 @@
12721250
position: absolute;
12731251
background: var-get($theme, 'week-number-background');
12741252
border-inline: rem(1px) solid var-get($theme, 'week-number-background');
1275-
inset-inline-start: rem(-1px);
12761253
inset-block-start: 100%;
1277-
height: 100%;
1254+
height: calc(#{$date-view-row-gap} + #{rem(if($variant == 'indigo', 0px, 2px))});
12781255
width: $date-size;
12791256
}
12801257
}
@@ -1507,6 +1484,29 @@
15071484
height: $date-size;
15081485
}
15091486
}
1487+
1488+
&%date-inner-week-number {
1489+
min-width: auto;
1490+
width: $date-size;
1491+
color: var-get($theme, 'week-number-foreground');
1492+
background: var-get($theme, 'week-number-background');
1493+
1494+
// This is not an actual date and should not change it's border when changing the date border
1495+
border-color: var-get($theme, 'week-number-background');
1496+
1497+
&::after {
1498+
display: none !important;
1499+
}
1500+
1501+
&::before {
1502+
content: '';
1503+
position: absolute;
1504+
background: var-get($theme, 'week-number-background');
1505+
inset-block-start: 100%;
1506+
height: calc(#{$date-view-row-gap} + #{rem(if($variant == 'indigo', 0, 2px))});
1507+
width: $date-size;
1508+
}
1509+
}
15101510
}
15111511

15121512
%date-weekend {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ export class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent
549549
const lowerCaseFilterValues = new Set(Array.from(expr.expression.searchVal).map((value: string) => value.toLowerCase()));
550550

551551
this.grid.data.forEach(item => {
552-
if (lowerCaseFilterValues.has(item[this.column.field]?.toLowerCase())) {
552+
if (typeof item[this.column.field] === "string" && lowerCaseFilterValues.has(item[this.column.field]?.toLowerCase())) {
553553
expr.expression.searchVal.add(item[this.column.field]);
554554
}
555555
});

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { GridFunctions } from '../../test-utils/grid-functions.spec';
1313
import { UIInteractions } from '../../test-utils/ui-interactions.spec';
1414
import { SampleTestData } from '../../test-utils/sample-test-data.spec';
1515
import { By } from '@angular/platform-browser';
16+
import { GridColumnDataType } from '../../data-operations/data-util';
1617

1718
const IGX_CHECKBOX_LABEL = '.igx-checkbox__label';
1819

@@ -751,6 +752,29 @@ describe('IgxTreeGrid - Filtering actions #tGrid', () => {
751752
emptyTextEl = searchComponent.querySelector('.igx-excel-filter__empty');
752753
expect(emptyTextEl.innerText).toEqual('No matches');
753754
}));
755+
756+
it('Should not throw console error when number column with dataType string is filtered.', fakeAsync(() => {
757+
tGrid.columns[0].dataType = GridColumnDataType.String;
758+
fix.detectChanges();
759+
spyOn(console, 'error');
760+
761+
GridFunctions.clickExcelFilterIcon(fix, 'ID');
762+
fix.detectChanges();
763+
tick();
764+
765+
const excelMenu = GridFunctions.getExcelStyleFilteringComponent(fix, 'igx-tree-grid');
766+
const checkboxes: any[] = Array.from(GridFunctions.getExcelStyleFilteringCheckboxes(fix, excelMenu, 'igx-tree-grid'));
767+
768+
checkboxes[2].click();
769+
tick();
770+
fix.detectChanges();
771+
772+
GridFunctions.clickApplyExcelStyleFiltering(fix, null, 'igx-tree-grid');
773+
fix.detectChanges();
774+
tick();
775+
776+
expect(console.error).not.toHaveBeenCalled();
777+
}));
754778
});
755779

756780
describe('Tree grid ESF templates', () => {

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

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,8 @@ describe('IgxSimpleCombo', () => {
11191119
IgxSimpleComboSampleComponent,
11201120
IgxComboInContainerTestComponent,
11211121
IgxSimpleComboIconTemplatesComponent,
1122-
IgxSimpleComboDirtyCheckTestComponent
1122+
IgxSimpleComboDirtyCheckTestComponent,
1123+
IgxSimpleComboTabBehaviorTestComponent
11231124
]
11241125
}).compileComponents();
11251126
}));
@@ -2113,6 +2114,35 @@ describe('IgxSimpleCombo', () => {
21132114

21142115
expect(reactiveForm.dirty).toBe(false);
21152116
}));
2117+
2118+
it('should focus on the next combo when Tab is pressed', fakeAsync(() => {
2119+
fixture = TestBed.createComponent(IgxSimpleComboTabBehaviorTestComponent);
2120+
fixture.detectChanges();
2121+
2122+
const combos = fixture.debugElement.queryAll(By.directive(IgxSimpleComboComponent));
2123+
expect(combos.length).toBe(3);
2124+
2125+
const firstComboInput = combos[0].query(By.css(`.${CSS_CLASS_COMBO_INPUTGROUP}`));
2126+
const secondComboInput = combos[1].query(By.css(`.${CSS_CLASS_COMBO_INPUTGROUP}`));
2127+
const thirdComboInput = combos[2].query(By.css(`.${CSS_CLASS_COMBO_INPUTGROUP}`));
2128+
2129+
firstComboInput.nativeElement.focus();
2130+
tick();
2131+
fixture.detectChanges();
2132+
expect(document.activeElement).toEqual(firstComboInput.nativeElement);
2133+
2134+
UIInteractions.triggerEventHandlerKeyDown('Tab', firstComboInput);
2135+
secondComboInput.nativeElement.focus();
2136+
tick();
2137+
fixture.detectChanges();
2138+
expect(document.activeElement).toEqual(secondComboInput.nativeElement);
2139+
2140+
UIInteractions.triggerEventHandlerKeyDown('Tab', secondComboInput);
2141+
thirdComboInput.nativeElement.focus();
2142+
tick();
2143+
fixture.detectChanges();
2144+
expect(document.activeElement).toEqual(thirdComboInput.nativeElement);
2145+
}));
21162146
});
21172147

21182148
describe('Display density', () => {
@@ -3456,3 +3486,64 @@ export class IgxSimpleComboDirtyCheckTestComponent implements OnInit {
34563486
];
34573487
}
34583488
}
3489+
3490+
@Component({
3491+
template: `
3492+
<form [formGroup]="form">
3493+
<div class="combo-section">
3494+
<igx-simple-combo
3495+
#combo
3496+
[data]="cities"
3497+
[displayKey]="'name'"
3498+
[valueKey]="'id'"
3499+
formControlName="city"
3500+
>
3501+
</igx-simple-combo>
3502+
3503+
<igx-simple-combo
3504+
#combo2
3505+
[data]="cities"
3506+
[displayKey]="'name'"
3507+
[valueKey]="'id'"
3508+
formControlName="city2"
3509+
></igx-simple-combo>
3510+
3511+
<igx-simple-combo
3512+
#combo3
3513+
[data]="cities"
3514+
[displayKey]="'name'"
3515+
[valueKey]="'id'"
3516+
formControlName="city3"
3517+
></igx-simple-combo>
3518+
</div>
3519+
</form>
3520+
`,
3521+
standalone: true,
3522+
imports: [IgxSimpleComboComponent, ReactiveFormsModule]
3523+
})
3524+
export class IgxSimpleComboTabBehaviorTestComponent implements OnInit {
3525+
@ViewChild('combo', { read: IgxSimpleComboComponent, static: true })
3526+
public combo: IgxSimpleComboComponent;
3527+
@ViewChild('combo2', { read: IgxSimpleComboComponent, static: true })
3528+
public combo2: IgxSimpleComboComponent;
3529+
@ViewChild('combo3', { read: IgxSimpleComboComponent, static: true })
3530+
public combo3: IgxSimpleComboComponent;
3531+
3532+
public cities = [];
3533+
3534+
public form = new FormGroup({
3535+
city: new FormControl<number>({ value: undefined, disabled: false }),
3536+
city2: new FormControl<number>({ value: undefined, disabled: false }),
3537+
city3: new FormControl<number>({ value: undefined, disabled: false }),
3538+
});
3539+
3540+
public ngOnInit(): void {
3541+
this.cities = [
3542+
{ id: 1, name: 'New York' },
3543+
{ id: 2, name: 'Los Angeles' },
3544+
{ id: 3, name: 'Chicago' },
3545+
{ id: 4, name: 'Houston' },
3546+
{ id: 5, name: 'Phoenix' }
3547+
];
3548+
}
3549+
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,8 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
466466
}
467467

468468
this.composing = false;
469-
// explicitly update selection and trigger text selection so that we don't have to force CD
469+
// explicitly update selection so that we don't have to force CD
470470
this.textSelection.selected = true;
471-
this.textSelection.trigger();
472471
}
473472

474473
/** @hidden @internal */

0 commit comments

Comments
 (0)