@progress/kendo-angular-treelist
Version:
Kendo UI TreeList for Angular - Display hierarchical data in an Angular tree grid view that supports sorting, filtering, paging, and much more.
40 lines (39 loc) • 1.66 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Directive } from '@angular/core';
import { EditingDirectiveBase } from './editing-directive-base';
import * as i0 from "@angular/core";
/**
* @hidden
*/
export class RowEditingDirectiveBase extends EditingDirectiveBase {
/**
* @hidden
*/
ngOnInit() {
super.ngOnInit();
this.subscriptions
.add(this.treelist.edit.subscribe(this.editHandler.bind(this)));
}
addHandler(args) {
this.closeEditor();
super.addHandler(args);
}
editHandler(args) {
this.closeEditor();
this.dataItem = args.dataItem;
this.treelist.editRow(args.dataItem, this.createModel(args));
}
saveHandler(args) {
super.saveHandler(args);
this.clean();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowEditingDirectiveBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: RowEditingDirectiveBase, usesInheritance: true, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowEditingDirectiveBase, decorators: [{
type: Directive,
args: [{}]
}] });