UNPKG

@progress/kendo-angular-grid

Version:

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

53 lines (52 loc) 2.61 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { AfterContentChecked, ElementRef, Renderer2, OnDestroy, NgZone } from '@angular/core'; import { SelectionService } from './selection.service'; import { CellSelectionAggregateService } from '../aggregates/selection-aggregate.service'; import { CellSelectionService } from './cell-selection.service'; import { CheckBoxComponent } from '@progress/kendo-angular-inputs'; import * as i0 from "@angular/core"; /** * Adds a row-selection checkbox to the Grid. * Use this directive on a `<kendo-checkbox>` component or `<input type="checkbox">` element inside a cell template. * When the user clicks the checkbox, the Grid triggers a [`selectionChange`](slug:api_grid_gridcomponent#toc-selectionChange) event. * * @example * ```html * <kendo-grid> * <kendo-grid-column> * <ng-template kendoGridCellTemplate let-rowIndex="rowIndex"> * <input [kendoGridSelectionCheckbox]="rowIndex"/> * <kendo-checkbox [kendoGridSelectionCheckbox]="rowIndex"></kendo-checkbox> * </ng-template> * </kendo-grid-column> * </kendo-grid> * ``` * @remarks * Applied to: {@link CheckBoxComponent}. */ export declare class SelectionCheckboxDirective implements AfterContentChecked, OnDestroy { private selectionService; private cellSelectionService; private aggregateService; private el; private renderer; private ngZone; private checkbox; /** * Sets the index of the `dataItem` to select. */ itemIndex: number; private destroyClick; private destroyKeyDown; ngAfterContentChecked(): void; constructor(selectionService: SelectionService, cellSelectionService: CellSelectionService, aggregateService: CellSelectionAggregateService, el: ElementRef, renderer: Renderer2, ngZone: NgZone, checkbox: CheckBoxComponent); ngOnDestroy(): void; private onClick; private onKeyDown; private setCheckedState; static ɵfac: i0.ɵɵFactoryDeclaration<SelectionCheckboxDirective, [null, null, null, null, null, null, { optional: true; host: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<SelectionCheckboxDirective, "[kendoGridSelectionCheckbox]", never, { "itemIndex": { "alias": "kendoGridSelectionCheckbox"; "required": false; }; }, {}, never, never, true, never>; }