UNPKG

@progress/kendo-angular-listview

Version:

Kendo UI Angular listview component

49 lines (48 loc) 2.16 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ElementRef, Renderer2 as Renderer, NgZone } from '@angular/core'; import { Button } from '@progress/kendo-angular-buttons'; import { LocalizationService } from '@progress/kendo-angular-l10n'; import { EditService } from '../edit.service'; import * as i0 from "@angular/core"; /** * Represents the save command button directive of the Kendo UI ListView for Angular. * Provides the `save` command of the ListView. You can apply this directive to any `button` * element inside a [`EditTemplateDirective`]({% slug api_listview_edittemplatedirective %}) template. * When you click an associated button with the directive, the * [`save`]({% slug api_listview_listviewcomponent %}#toc-save) event * triggers ([see example]({% slug editing_listview %})). * * @example * ```html * <kendo-listview> * <ng-template kendoListViewEditTemplate> * <button kendoListViewSaveCommand>Save changes</button> * </ng-template> * </kendo-listview> * ``` * * You can control the content of the button based on the state of the item. * * @example * ```html * <kendo-listview> * <ng-template kendoListViewEditTemplate let-isNew="isNew"> * <button kendoListViewSaveCommand>{{isNew ? 'Add' : 'Update'}}</button> * </ng-template> * </kendo-listview> * ``` */ export declare class SaveCommandDirective extends Button { private editService; private elementRef; /** * @hidden */ clickHandler(e: any): void; constructor(editService: EditService, element: ElementRef, renderer: Renderer, localization: LocalizationService, ngZone: NgZone); static ɵfac: i0.ɵɵFactoryDeclaration<SaveCommandDirective, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SaveCommandDirective, "[kendoListViewSaveCommand]", never, {}, {}, never, ["*"], true, never>; }