Skip to content

Commit e924895

Browse files
committed
fix(state-directive): clear previous selection setting state #9139
1 parent 57178c5 commit e924895

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

projects/igniteui-angular/src/lib/grids/state.directive.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ describe('IgxGridState - input properties #grid', () => {
360360

361361
let gridState = state.getState(true, 'rowSelection');
362362
expect(gridState).toBe(initialState);
363-
363+
state.setState('{"rowSelection":[2]}');
364364
state.setState(rowSelectionState);
365365
gridState = state.getState(false, 'rowSelection');
366366
HelperFunctions.verifyRowSelection(grid.selectedRows, gridState as IGridState);

projects/igniteui-angular/src/lib/grids/state.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export class IgxGridStateDirective {
239239
return { rowSelection: selection };
240240
},
241241
restoreFeatureState(context: IgxGridStateDirective, state: any[]): void {
242-
context.currGrid.selectRows(state);
242+
context.currGrid.selectRows(state, true);
243243
}
244244
},
245245
cellSelection: {

0 commit comments

Comments
 (0)