diff --git a/projects/ngx-datatable/src/lib/components/body/body-cell.component.spec.ts b/projects/ngx-datatable/src/lib/components/body/body-cell.component.spec.ts index 5b316c7f8..3297e000c 100644 --- a/projects/ngx-datatable/src/lib/components/body/body-cell.component.spec.ts +++ b/projects/ngx-datatable/src/lib/components/body/body-cell.component.spec.ts @@ -8,7 +8,6 @@ import { DataTableBodyCellComponent } from './body-cell.component'; describe('DataTableBodyCellComponent', () => { let fixture: ComponentFixture; let component: DataTableBodyCellComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -21,7 +20,6 @@ describe('DataTableBodyCellComponent', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(DataTableBodyCellComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/components/body/body-group-header-template.directive.ts b/projects/ngx-datatable/src/lib/components/body/body-group-header-template.directive.ts index a7052c2d1..790949b5a 100644 --- a/projects/ngx-datatable/src/lib/components/body/body-group-header-template.directive.ts +++ b/projects/ngx-datatable/src/lib/components/body/body-group-header-template.directive.ts @@ -1,4 +1,4 @@ -import { Directive, TemplateRef } from '@angular/core'; +import { Directive } from '@angular/core'; import { GroupContext } from '../../types/public.types'; @Directive({ diff --git a/projects/ngx-datatable/src/lib/components/body/body-row-wrapper.component.spec.ts b/projects/ngx-datatable/src/lib/components/body/body-row-wrapper.component.spec.ts index c7fa218e3..f0f90ac57 100644 --- a/projects/ngx-datatable/src/lib/components/body/body-row-wrapper.component.spec.ts +++ b/projects/ngx-datatable/src/lib/components/body/body-row-wrapper.component.spec.ts @@ -1,15 +1,21 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { DataTableRowWrapperComponent } from './body-row-wrapper.component'; +import { DatatableComponentToken } from '../../utils/table-token'; describe('DataTableRowWrapperComponent', () => { let fixture: ComponentFixture; let component: DataTableRowWrapperComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { TestBed.configureTestingModule({ - declarations: [DataTableRowWrapperComponent] + declarations: [DataTableRowWrapperComponent], + providers: [ + { + provide: DatatableComponentToken, + useValue: {} + } + ] }); }); @@ -17,15 +23,12 @@ describe('DataTableRowWrapperComponent', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(DataTableRowWrapperComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); - /* describe('fixture', () => { it('should have a component instance', () => { expect(component).toBeTruthy(); }); }); - */ }); diff --git a/projects/ngx-datatable/src/lib/components/body/body-row-wrapper.component.ts b/projects/ngx-datatable/src/lib/components/body/body-row-wrapper.component.ts index 15f428ef2..c3e8ed5e8 100644 --- a/projects/ngx-datatable/src/lib/components/body/body-row-wrapper.component.ts +++ b/projects/ngx-datatable/src/lib/components/body/body-row-wrapper.component.ts @@ -20,7 +20,6 @@ import { ViewChild } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; -import { NgStyle } from '@angular/common'; import { DatatableComponentToken } from '../../utils/table-token'; import { Group, GroupContext, RowDetailContext, RowOrGroup } from '../../types/public.types'; import { DatatableGroupHeaderDirective } from './body-group-header.directive'; diff --git a/projects/ngx-datatable/src/lib/components/body/body-row.component.spec.ts b/projects/ngx-datatable/src/lib/components/body/body-row.component.spec.ts index 962d0cb63..165170b7f 100644 --- a/projects/ngx-datatable/src/lib/components/body/body-row.component.spec.ts +++ b/projects/ngx-datatable/src/lib/components/body/body-row.component.spec.ts @@ -5,7 +5,6 @@ import { DataTableBodyCellComponent } from './body-cell.component'; describe('DataTableBodyRowComponent', () => { let fixture: ComponentFixture; let component: DataTableBodyRowComponent; - let element: any; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -18,15 +17,12 @@ describe('DataTableBodyRowComponent', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(DataTableBodyRowComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); - /* describe('fixture', () => { it('should have a component instance', () => { expect(component).toBeTruthy(); }); }); - */ }); diff --git a/projects/ngx-datatable/src/lib/components/body/body-row.component.ts b/projects/ngx-datatable/src/lib/components/body/body-row.component.ts index 4d33b1bb5..634e64292 100644 --- a/projects/ngx-datatable/src/lib/components/body/body-row.component.ts +++ b/projects/ngx-datatable/src/lib/components/body/body-row.component.ts @@ -18,10 +18,8 @@ import { import { columnGroupWidths, columnsByPin, columnsByPinArr } from '../../utils/column'; import { Keys } from '../../utils/keys'; -import { ScrollbarHelper } from '../../services/scrollbar-helper.service'; import { BehaviorSubject } from 'rxjs'; import { ActivateEvent, RowOrGroup, TreeStatus } from '../../types/public.types'; -import { NgStyle } from '@angular/common'; import { TableColumn } from '../../types/table-column.type'; import { ColumnGroupWidth, PinnedColumns } from '../../types/internal.types'; @@ -60,7 +58,6 @@ import { ColumnGroupWidth, PinnedColumns } from '../../types/internal.types'; ` }) export class DataTableBodyRowComponent implements DoCheck, OnChanges { - private scrollbarHelper = inject(ScrollbarHelper); private cd = inject(ChangeDetectorRef); @Input() set columns(val: TableColumn[]) { @@ -157,11 +154,6 @@ export class DataTableBodyRowComponent implements DoCheck, OnChanges _offsetX: number; _columns: TableColumn[]; _innerWidth: number; - _groupStyles: { - left: NgStyle['ngStyle']; - center: NgStyle['ngStyle']; - right: NgStyle['ngStyle']; - } = { left: {}, center: {}, right: {} }; private _rowDiffer: KeyValueDiffer, any> = inject(KeyValueDiffers) .find({}) diff --git a/projects/ngx-datatable/src/lib/components/body/body.component.spec.ts b/projects/ngx-datatable/src/lib/components/body/body.component.spec.ts index 8a696af2d..581d976c1 100644 --- a/projects/ngx-datatable/src/lib/components/body/body.component.spec.ts +++ b/projects/ngx-datatable/src/lib/components/body/body.component.spec.ts @@ -12,7 +12,6 @@ import { ScrollbarHelper } from '../../services/scrollbar-helper.service'; describe('DataTableBodyComponent', () => { let fixture: ComponentFixture; let component: DataTableBodyComponent; - let element: any; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -35,7 +34,6 @@ describe('DataTableBodyComponent', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(DataTableBodyComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/components/body/body.component.ts b/projects/ngx-datatable/src/lib/components/body/body.component.ts index 38bc93dc9..a64a19c7c 100644 --- a/projects/ngx-datatable/src/lib/components/body/body.component.ts +++ b/projects/ngx-datatable/src/lib/components/body/body.component.ts @@ -584,13 +584,6 @@ export class DataTableBodyComponent (this.loadingIndicator = false), 500); - } - /** * Updates the index of the rows in the viewport */ @@ -931,13 +917,6 @@ export class DataTableBodyComponent { let fixture: ComponentFixture; let component: DataTableGhostLoaderComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -17,7 +16,6 @@ describe('DataTableGhostLoaderComponent', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(DataTableGhostLoaderComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/components/body/progress-bar.component.spec.ts b/projects/ngx-datatable/src/lib/components/body/progress-bar.component.spec.ts index 0d27ca798..1fc171d47 100644 --- a/projects/ngx-datatable/src/lib/components/body/progress-bar.component.spec.ts +++ b/projects/ngx-datatable/src/lib/components/body/progress-bar.component.spec.ts @@ -4,7 +4,6 @@ import { ProgressBarComponent } from './progress-bar.component'; describe('ProgressBarComponent', () => { let fixture: ComponentFixture; let component: ProgressBarComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -17,7 +16,6 @@ describe('ProgressBarComponent', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(ProgressBarComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/components/body/scroller.component.spec.ts b/projects/ngx-datatable/src/lib/components/body/scroller.component.spec.ts index dcac69514..5805954e4 100644 --- a/projects/ngx-datatable/src/lib/components/body/scroller.component.spec.ts +++ b/projects/ngx-datatable/src/lib/components/body/scroller.component.spec.ts @@ -4,7 +4,6 @@ import { ScrollerComponent } from './scroller.component'; describe('ScrollerComponent', () => { let fixture: ComponentFixture; let component: ScrollerComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -17,7 +16,6 @@ describe('ScrollerComponent', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(ScrollerComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/components/body/scroller.component.ts b/projects/ngx-datatable/src/lib/components/body/scroller.component.ts index 733be202f..7398893f8 100644 --- a/projects/ngx-datatable/src/lib/components/body/scroller.component.ts +++ b/projects/ngx-datatable/src/lib/components/body/scroller.component.ts @@ -6,7 +6,6 @@ import { HostBinding, inject, Input, - NgZone, OnDestroy, OnInit, Output, diff --git a/projects/ngx-datatable/src/lib/components/body/selection.component.spec.ts b/projects/ngx-datatable/src/lib/components/body/selection.component.spec.ts index 794ed4cc7..168481a05 100644 --- a/projects/ngx-datatable/src/lib/components/body/selection.component.spec.ts +++ b/projects/ngx-datatable/src/lib/components/body/selection.component.spec.ts @@ -4,7 +4,6 @@ import { DataTableSelectionComponent } from './selection.component'; describe('DataTableSelectionComponent', () => { let fixture: ComponentFixture; let component: DataTableSelectionComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -17,7 +16,6 @@ describe('DataTableSelectionComponent', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(DataTableSelectionComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/components/body/summary/summary-row.component.spec.ts b/projects/ngx-datatable/src/lib/components/body/summary/summary-row.component.spec.ts index c32ee9145..5ff33a95b 100644 --- a/projects/ngx-datatable/src/lib/components/body/summary/summary-row.component.spec.ts +++ b/projects/ngx-datatable/src/lib/components/body/summary/summary-row.component.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { DebugElement, PipeTransform } from '@angular/core'; +import { DebugElement } from '@angular/core'; import { By } from '@angular/platform-browser'; import { DataTableBodyRowComponent } from '../body-row.component'; diff --git a/projects/ngx-datatable/src/lib/components/columns/column-ghost-cell.directive.ts b/projects/ngx-datatable/src/lib/components/columns/column-ghost-cell.directive.ts index fcb388ca3..04101a7ce 100644 --- a/projects/ngx-datatable/src/lib/components/columns/column-ghost-cell.directive.ts +++ b/projects/ngx-datatable/src/lib/components/columns/column-ghost-cell.directive.ts @@ -1,4 +1,4 @@ -import { Directive, TemplateRef } from '@angular/core'; +import { Directive } from '@angular/core'; @Directive({ selector: '[ngx-datatable-ghost-cell-template]' }) export class DataTableColumnGhostCellDirective { diff --git a/projects/ngx-datatable/src/lib/components/columns/column.directive.spec.ts b/projects/ngx-datatable/src/lib/components/columns/column.directive.spec.ts index 1263b8f5b..7772d2332 100644 --- a/projects/ngx-datatable/src/lib/components/columns/column.directive.spec.ts +++ b/projects/ngx-datatable/src/lib/components/columns/column.directive.spec.ts @@ -22,7 +22,6 @@ class TestFixtureComponent { describe('DataTableColumnDirective', () => { let fixture: ComponentFixture; let component: TestFixtureComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -43,7 +42,6 @@ describe('DataTableColumnDirective', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(TestFixtureComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/components/footer/pager.component.spec.ts b/projects/ngx-datatable/src/lib/components/footer/pager.component.spec.ts index 942a03c23..3eb7384e4 100644 --- a/projects/ngx-datatable/src/lib/components/footer/pager.component.spec.ts +++ b/projects/ngx-datatable/src/lib/components/footer/pager.component.spec.ts @@ -5,7 +5,6 @@ import { DataTablePagerComponent } from './pager.component'; describe('DataTablePagerComponent', () => { let fixture; let pager: DataTablePagerComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => @@ -19,7 +18,6 @@ describe('DataTablePagerComponent', () => { fixture = TestBed.createComponent(DataTablePagerComponent); pager = fixture.componentInstance; - element = fixture.nativeElement; })); describe('size', () => { diff --git a/projects/ngx-datatable/src/lib/components/header/header-cell.component.spec.ts b/projects/ngx-datatable/src/lib/components/header/header-cell.component.spec.ts index 0284fbccd..6cdf27e53 100644 --- a/projects/ngx-datatable/src/lib/components/header/header-cell.component.spec.ts +++ b/projects/ngx-datatable/src/lib/components/header/header-cell.component.spec.ts @@ -4,7 +4,6 @@ import { DataTableHeaderCellComponent } from './header-cell.component'; describe('DataTableHeaderCellComponent', () => { let fixture: ComponentFixture; let component: DataTableHeaderCellComponent; - let element: any; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -17,7 +16,6 @@ describe('DataTableHeaderCellComponent', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(DataTableHeaderCellComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/components/row-detail/row-detail-template.directive.ts b/projects/ngx-datatable/src/lib/components/row-detail/row-detail-template.directive.ts index d0a66a366..2ebb934ce 100644 --- a/projects/ngx-datatable/src/lib/components/row-detail/row-detail-template.directive.ts +++ b/projects/ngx-datatable/src/lib/components/row-detail/row-detail-template.directive.ts @@ -1,4 +1,4 @@ -import { Directive, TemplateRef } from '@angular/core'; +import { Directive } from '@angular/core'; import { RowDetailContext } from '../../types/public.types'; @Directive({ diff --git a/projects/ngx-datatable/src/lib/components/row-detail/row-detail.directive.spec.ts b/projects/ngx-datatable/src/lib/components/row-detail/row-detail.directive.spec.ts index 3e9ef2c72..26257c28d 100644 --- a/projects/ngx-datatable/src/lib/components/row-detail/row-detail.directive.spec.ts +++ b/projects/ngx-datatable/src/lib/components/row-detail/row-detail.directive.spec.ts @@ -18,7 +18,6 @@ class TestFixtureComponent {} describe('DatatableRowDetailDirective', () => { let fixture: ComponentFixture; let component: TestFixtureComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -35,7 +34,6 @@ describe('DatatableRowDetailDirective', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(TestFixtureComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/directives/disable-row.directive.ts b/projects/ngx-datatable/src/lib/directives/disable-row.directive.ts index ca567d787..c7df38f92 100644 --- a/projects/ngx-datatable/src/lib/directives/disable-row.directive.ts +++ b/projects/ngx-datatable/src/lib/directives/disable-row.directive.ts @@ -1,11 +1,4 @@ -import { - AfterContentInit, - booleanAttribute, - Directive, - ElementRef, - inject, - Input -} from '@angular/core'; +import { booleanAttribute, Directive, ElementRef, inject, Input } from '@angular/core'; /** * Row Disable Directive diff --git a/projects/ngx-datatable/src/lib/directives/long-press.directive.spec.ts b/projects/ngx-datatable/src/lib/directives/long-press.directive.spec.ts index aedaae748..5aa029e7a 100644 --- a/projects/ngx-datatable/src/lib/directives/long-press.directive.spec.ts +++ b/projects/ngx-datatable/src/lib/directives/long-press.directive.spec.ts @@ -1,4 +1,4 @@ -import { ComponentFixture, fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { Component } from '@angular/core'; import { By } from '@angular/platform-browser'; import { LongPressDirective } from './long-press.directive'; @@ -12,7 +12,6 @@ class TestFixtureComponent {} describe('LongPressDirective', () => { let fixture: ComponentFixture; let component: TestFixtureComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -25,7 +24,6 @@ describe('LongPressDirective', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(TestFixtureComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/directives/long-press.directive.ts b/projects/ngx-datatable/src/lib/directives/long-press.directive.ts index fa13f0aea..324d449f6 100644 --- a/projects/ngx-datatable/src/lib/directives/long-press.directive.ts +++ b/projects/ngx-datatable/src/lib/directives/long-press.directive.ts @@ -9,9 +9,8 @@ import { OnDestroy, Output } from '@angular/core'; -import { fromEvent, Observable, Subscription } from 'rxjs'; +import { fromEvent, Subscription } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { MouseEvent } from '../events'; import { TableColumn } from '../types/table-column.type'; @Directive({ selector: '[long-press]' }) diff --git a/projects/ngx-datatable/src/lib/directives/orderable.directive.spec.ts b/projects/ngx-datatable/src/lib/directives/orderable.directive.spec.ts index 6bee66b39..3b9dba0fc 100644 --- a/projects/ngx-datatable/src/lib/directives/orderable.directive.spec.ts +++ b/projects/ngx-datatable/src/lib/directives/orderable.directive.spec.ts @@ -1,12 +1,5 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { - Component, - ElementRef, - Injector, - QueryList, - runInInjectionContext, - ViewChildren -} from '@angular/core'; +import { Component, QueryList, ViewChildren } from '@angular/core'; import { By } from '@angular/platform-browser'; import { OrderableDirective } from './orderable.directive'; @@ -31,7 +24,6 @@ class TestFixtureComponent { describe('OrderableDirective', () => { let fixture: ComponentFixture; let component: TestFixtureComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -44,7 +36,6 @@ describe('OrderableDirective', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(TestFixtureComponent); component = fixture.componentInstance; - element = fixture.nativeElement; /* This is required in order to resolve the `ContentChildren`. * If we don't go through at least on change detection cycle * the `draggables` will be `undefined` and `ngOnDestroy` will diff --git a/projects/ngx-datatable/src/lib/directives/resizeable.directive.spec.ts b/projects/ngx-datatable/src/lib/directives/resizeable.directive.spec.ts index 22d6a259e..dbb61b916 100644 --- a/projects/ngx-datatable/src/lib/directives/resizeable.directive.spec.ts +++ b/projects/ngx-datatable/src/lib/directives/resizeable.directive.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { Component, DebugElement } from '@angular/core'; +import { Component } from '@angular/core'; import { By } from '@angular/platform-browser'; import { ResizeableDirective } from './resizeable.directive'; @@ -12,7 +12,6 @@ class TestFixtureComponent {} describe('ResizeableDirective', () => { let fixture: ComponentFixture; let component: TestFixtureComponent; - let element: any; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -25,7 +24,6 @@ describe('ResizeableDirective', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(TestFixtureComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/directives/visibility.directive.spec.ts b/projects/ngx-datatable/src/lib/directives/visibility.directive.spec.ts index 2235fd9cd..276bffef0 100644 --- a/projects/ngx-datatable/src/lib/directives/visibility.directive.spec.ts +++ b/projects/ngx-datatable/src/lib/directives/visibility.directive.spec.ts @@ -20,7 +20,6 @@ class TestFixtureComponent {} describe('VisibilityDirective', () => { let fixture: ComponentFixture; let component: TestFixtureComponent; - let element; // provide our implementations or mocks to the dependency injector beforeEach(() => { @@ -33,7 +32,6 @@ describe('VisibilityDirective', () => { TestBed.compileComponents().then(() => { fixture = TestBed.createComponent(TestFixtureComponent); component = fixture.componentInstance; - element = fixture.nativeElement; }); })); diff --git a/projects/ngx-datatable/src/lib/services/dimensions-helper.service.ts b/projects/ngx-datatable/src/lib/services/dimensions-helper.service.ts index 5de93c998..d3f97c81b 100644 --- a/projects/ngx-datatable/src/lib/services/dimensions-helper.service.ts +++ b/projects/ngx-datatable/src/lib/services/dimensions-helper.service.ts @@ -1,4 +1,4 @@ -import { Inject, Injectable } from '@angular/core'; +import { Injectable } from '@angular/core'; /** * Gets the width of the scrollbar. Nesc for windows diff --git a/src/app/basic/live.component.ts b/src/app/basic/live.component.ts index d040bfcb7..4847a5c64 100644 --- a/src/app/basic/live.component.ts +++ b/src/app/basic/live.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectorRef, Component, ViewChild } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; import { ColumnMode, DatatableComponent } from 'projects/ngx-datatable/src/public-api'; import { Employee } from '../data.model'; @@ -52,7 +52,7 @@ export class LiveDataComponent { ColumnMode = ColumnMode; - constructor(private cd: ChangeDetectorRef) { + constructor() { this.fetch(data => { this.rows = data.map(d => { d.updated = Date.now().toString(); diff --git a/src/app/tree/client-tree.component.ts b/src/app/tree/client-tree.component.ts index 35b33adad..ac229f307 100644 --- a/src/app/tree/client-tree.component.ts +++ b/src/app/tree/client-tree.component.ts @@ -71,7 +71,6 @@ export class ClientTreeComponent { } onTreeAction(event: any) { - const index = event.rowIndex; const row = event.row; if (row.treeStatus === 'collapsed') { row.treeStatus = 'expanded'; diff --git a/src/app/tree/fullscreen.component.ts b/src/app/tree/fullscreen.component.ts index 470bde03e..772a42366 100644 --- a/src/app/tree/fullscreen.component.ts +++ b/src/app/tree/fullscreen.component.ts @@ -91,7 +91,6 @@ export class FullScreenTreeComponent { } onTreeAction(event: any) { - const index = event.rowIndex; const row = event.row; if (row.treeStatus === 'collapsed') { row.treeStatus = 'loading'; diff --git a/tsconfig.json b/tsconfig.json index 84f35c1e1..22f60740f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,7 @@ "lib": ["es2022", "dom"], "resolveJsonModule": true, "esModuleInterop": true, + "noUnusedLocals": true, "allowSyntheticDefaultImports": true, "paths": { "@siemens/ngx-datatable": ["dist/ngx-datatable"],