@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
30 lines (29 loc) • 1.43 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 { Injectable } from '@angular/core';
import { Subject, Subscription } from "rxjs";
import { throttleTime } from 'rxjs/operators';
import * as i0 from "@angular/core";
/**
* @hidden
*/
export class ResizeService {
resizeSubscription = new Subscription(() => { });
dispatcher = new Subject();
changes = this.dispatcher.asObservable().pipe(throttleTime(100));
connect(resizes) {
this.resizeSubscription.add(resizes.subscribe(this.dispatcher));
}
destroy() {
if (this.resizeSubscription) {
this.resizeSubscription.unsubscribe();
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ResizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ResizeService });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ResizeService, decorators: [{
type: Injectable
}] });