Skip to content

Commit 8bffc2f

Browse files
Merge branch '17.2.x' into ganastasov/fix-14314-17.2.x
2 parents d4a214f + e08e47f commit 8bffc2f

File tree

6 files changed

+36
-10
lines changed

6 files changed

+36
-10
lines changed

projects/igniteui-angular/src/lib/directives/drag-drop/drag-drop.directive.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,10 @@ export class IgxDragDirective implements AfterContentInit, OnDestroy {
14631463

14641464
/** Method setting transformation to the base draggable element. */
14651465
protected setTransformXY(x: number, y: number) {
1466+
if(x === 0 && y === 0) {
1467+
this.element.nativeElement.style.transform = '';
1468+
return;
1469+
}
14661470
this.element.nativeElement.style.transform = 'translate3d(' + x + 'px, ' + y + 'px, 0px)';
14671471
}
14681472

projects/igniteui-angular/src/lib/grids/selection/selection.service.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,10 @@ export class IgxGridSelectionService {
400400
return Array.from(this.rowSelection);
401401
}
402402
const selection = [];
403+
const gridDataMap = {};
404+
this.grid.gridAPI.get_all_data(true).forEach(row => gridDataMap[this.getRecordKey(row)] = row);
403405
this.rowSelection.forEach(rID => {
404-
const rData = this.grid.gridAPI.get_all_data(true).find(row => this.getRecordKey(row) === rID);
406+
const rData = gridDataMap[rID];
405407
const partialRowData = {};
406408
partialRowData[this.grid.primaryKey] = rID;
407409
selection.push(rData ? rData : partialRowData);
@@ -607,9 +609,9 @@ export class IgxGridSelectionService {
607609
if (this.allRowsSelected !== undefined && !newSelection) {
608610
return this.allRowsSelected;
609611
}
610-
const selectedData = newSelection ? newSelection : [...this.rowSelection]
612+
const selectedData = new Set(newSelection ? newSelection : [...this.rowSelection]);
611613
const allData = this.getRowIDs(this.allData);
612-
const unSelectedRows = allData.filter(row => !selectedData.includes(row));
614+
const unSelectedRows = allData.filter(row => !selectedData.has(row));
613615
return this.allRowsSelected = this.allData.length > 0 && unSelectedRows.length === 0;
614616
}
615617

projects/igniteui-angular/src/lib/splitter/splitter.component.spec.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,25 @@ describe('IgxSplitter', () => {
304304
expect(pane2.element.offsetWidth).toBeCloseTo(pane2_originalSize - 100);
305305
});
306306

307+
it('should reset transform style of vertical splitter bar after dragging', async () => {
308+
const pane1 = splitter.panes.toArray()[0];
309+
pane1.size = '200px';
310+
fixture.detectChanges();
311+
312+
fixture.componentInstance.type = SplitterType.Vertical;
313+
fixture.detectChanges();
314+
const splitterBarComponent = fixture.debugElement.query(By.css(SPLITTERBAR_CLASS)).nativeElement;
315+
316+
const splitterBar = fixture.debugElement.query(By.css(SPLITTERBAR_CLASS)).context;
317+
splitterBar.moveStart.emit(pane1);
318+
splitterBar.moving.emit(-150);
319+
fixture.detectChanges();
320+
321+
splitterBar.movingEnd.emit(50);
322+
fixture.detectChanges();
323+
324+
expect(splitterBarComponent.style.transform).not.toBe('translate3d(0px, 0px, 0px)');
325+
});
307326
});
308327

309328
describe('IgxSplitter pane toggle', () => {

src/app/grid-performance/grid-performance.sample.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div style="height: 100vh; width: 100wh">
22
<h4 class="sample-title"> Fixed Size Rows</h4>
3-
<igx-grid #grid1 [rowHeight]="20" displayDensity="compact" [data]="localData" [rowSelection]="selectionMode" [allowFiltering]="true" [filterMode]="'excelStyleFilter'">
3+
<igx-grid #grid1 [rowHeight]="20" primaryKey="ID" displayDensity="compact" [data]="localData" [rowSelection]="selectionMode" [allowFiltering]="true" [filterMode]="'excelStyleFilter'">
44
<igx-grid-toolbar [displayDensity]="grid1.displayDensity">
55
<igx-grid-toolbar-actions>
66
<igx-grid-toolbar-pinning></igx-grid-toolbar-pinning>

src/app/grid-performance/grid-performance.sample.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class GridPerformanceSampleComponent implements OnInit {
2020
public selectionMode;
2121

2222
public ngOnInit() {
23-
this.selectionMode = GridSelectionMode.none;
23+
this.selectionMode = GridSelectionMode.multiple;
2424
const cols = [];
2525
cols.push({
2626
field: 'ID',

src/app/overlay/overlay.sample.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import {
2121
IgxLabelDirective,
2222
IgxButtonDirective,
2323
IgxRippleDirective,
24-
IgxDropDownItemComponent
24+
IgxDropDownItemComponent,
25+
IChangeCheckboxEventArgs
2526
} from 'igniteui-angular';
2627
import { IAnimationParams } from 'igniteui-angular/animations';
2728

@@ -81,8 +82,8 @@ export class OverlaySampleComponent implements OnInit {
8182
}
8283
}
8384

84-
public onChange(ev) {
85-
switch (ev.radio.name) {
85+
public onChange(ev: IChangeCheckboxEventArgs) {
86+
switch (ev.owner.name) {
8687
case 'ps':
8788
this.removeSelectedClass('direction');
8889
this.removeSelectedClass('start-point');
@@ -240,8 +241,8 @@ export class OverlaySampleComponent implements OnInit {
240241
this._overlaySettings.outlet = this.useOutlet ? this.outletElement : null;
241242
}
242243

243-
public onSwitchChange(ev) {
244-
switch (ev.switch.name) {
244+
public onSwitchChange(ev: IChangeCheckboxEventArgs) {
245+
switch (ev.owner.name) {
245246
case 'close':
246247
this._overlaySettings.closeOnOutsideClick = ev.checked;
247248
break;

0 commit comments

Comments
 (0)