@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
52 lines (51 loc) • 2.7 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* 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";
/**
* Represents the row-selection checkbox of the Grid. The directive expects the
* index of the current row as an input parameter. Inside the [`CellTemplateDirective`](slug:api_grid_celltemplatedirective), apply the
* `kendoGridSelectionCheckbox` to a `<kendo-checkbox></kendo-checkbox>` or an `<input type="checkbox"/>` element. When the user clicks the checkbox that is associated
* with the directive, a [selectionChange](slug:api_grid_gridcomponent#toc-selectionChange)
* event is triggered.
*
* @example
* ```html
* <kendo-grid ... >
* <kendo-grid-column>
* <ng-template kendoGridCellTemplate let-rowIndex="rowIndex">
* <input ... [kendoGridSelectionCheckbox]="rowIndex"/>
* </ng-template>
* </kendo-grid-column>
* </kendo-grid>
* ```
*/
export declare class SelectionCheckboxDirective implements AfterContentChecked, OnDestroy {
private selectionService;
private cellSelectionService;
private aggregateService;
private el;
private renderer;
private ngZone;
private checkbox;
/**
* The current index of the `dataItem` that will be selected.
*/
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>;
}