UNPKG

@progress/kendo-angular-grid

Version:

Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.

45 lines (44 loc) 2.07 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Directive, ChangeDetectorRef } from '@angular/core'; import { ContextService } from '../common/provider.service'; import { Selection } from "./selection-default"; import * as i0 from "@angular/core"; import * as i1 from "../common/provider.service"; /** * A directive which stores the row selection state of the Grid in memory * ([see example]({% slug selection_grid %}#toc-toggling-the-selection-functionality)). */ export class SelectionDirective extends Selection { ctx; constructor(ctx, cd) { super(ctx, cd); this.ctx = ctx; } /** * @hidden */ ngOnInit() { if (this.ctx.grid.selectable === false) { this.ctx.grid.selectable = true; } this.ctx.grid.selectionDirective = this; } /** * @hidden */ ngOnDestroy() { super.destroy(); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectionDirective, deps: [{ token: i1.ContextService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: SelectionDirective, isStandalone: true, selector: "[kendoGridSelectBy]", usesInheritance: true, ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectionDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoGridSelectBy]', standalone: true }] }], ctorParameters: function () { return [{ type: i1.ContextService }, { type: i0.ChangeDetectorRef }]; } });