Skip to content

Commit

Permalink
chore(*): update destroyer initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipata committed Feb 8, 2024
1 parent 9d26be9 commit a37ef15
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class DropDownRemoteComponent implements OnInit, OnDestroy, AfterViewInit
public itemsMaxHeight = 320;
public prevRequest: Subscription;
public rData: any;
private destroy$ = new Subject();
private destroy$ = new Subject<void>();
constructor(private remoteService: RemoteNWindService, public cdr: ChangeDetectorRef) { }

public ngAfterViewInit() {
Expand Down
2 changes: 1 addition & 1 deletion src/app/grid/grid-crud-sample/crud-sample.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class CRUDSampleComponent implements OnInit, OnDestroy {
public noopSortStrategy = NoopSortingStrategy.instance();

private _prevRequest: any;
private destroy$ = new Subject<boolean>();
private destroy$ = new Subject<void>();

private _perPage = 10;

Expand Down
2 changes: 1 addition & 1 deletion src/app/grid/grid-drop-indicator/grid-drop-indicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class GridDropIndicatorComponent implements AfterViewInit, OnDestroy {
@ViewChild('grid', { read: IgxGridComponent, static: true })
public grid: IgxGridComponent;
public data: any[];
private destroy$ = new Subject();
private destroy$ = new Subject<void>();
private intervalSub: Subscription;
private interval$: Observable<number>;
private _draggedRow: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class GridKeyboardnavGuide implements OnInit, OnDestroy {
'SUMMARY COMBINATIONS' : '';
}

private _destroyer = new Subject();
private _destroyer = new Subject<void>();
private _keyboardHandler = new KeyboardHandler([], GridSection.THEAD);

public constructor(private cdr: ChangeDetectorRef) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class RemoteFilteringSampleComponent implements OnInit, AfterViewInit, On

private _prevRequest: any;
private _chunkSize: number;
private destroy$ = new Subject<boolean>();
private destroy$ = new Subject<void>();

constructor(private _remoteService: RemoteFilteringService, public cdr: ChangeDetectorRef) { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class HGridKeyboardnavGuide implements OnInit, OnDestroy {

public gridTarget: GridUnderManagement;

private _destroyer = new Subject<boolean>();
private _destroyer = new Subject<void>();
private keyboardHandler = new KeyboardHandler([], GridSection.THEAD);

public constructor(
Expand Down Expand Up @@ -334,12 +334,12 @@ export class HGridKeyboardnavGuide implements OnInit, OnDestroy {

export class GridUnderManagement {
public hGrid: IgxHierarchicalGridComponent;
public destroyer = new Subject();
public destroyer = new Subject<void>();
public keyboardHandler: KeyboardHandler;
public cdr: ChangeDetectorRef;

constructor(hGrid: IgxHierarchicalGridComponent, keyboardHandler: KeyboardHandler,
destroyer: Subject<boolean>, cdr: ChangeDetectorRef) {
destroyer: Subject<void>, cdr: ChangeDetectorRef) {
this.hGrid = hGrid;
this.keyboardHandler = keyboardHandler;
this.destroyer = destroyer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class HGridEditingEventsComponent implements OnInit, OnDestroy {

public localData: Singer[];

private destroy$ = new Subject();
private destroy$ = new Subject<void>();

constructor() { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class BannerAdvancedSampleComponent implements OnInit, OnDestroy {
public contentWidth = '384px';
public imageUrls = ['assets/images/card/media/the_red_ice_forest.jpg',
'assets/images/card/media/yosemite.jpg'];
public onNetworkStateChange = new Subject();
public onNetworkStateChange = new Subject<void>();

private _wifiState = false;
public get wifiState(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class BannerStylingComponent implements OnInit, OnDestroy {
closeAnimation: slideOutRight,
openAnimation: slideInLeft
};
public onNetworkStateChange = new Subject();
public onNetworkStateChange = new Subject<void>();
private _wifiState = false;

public get wifiState(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class TGridKeyboardnavGuide implements OnInit, OnDestroy {
'SUMMARY COMBINATIONS' : '';
}

private _destroyer = new Subject();
private _destroyer = new Subject<void>();
private _keyboardHandler = new KeyboardHandler([], GridSection.THEAD);

public constructor(private cdr: ChangeDetectorRef, private _overlay: IgxOverlayService) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class TreeGridRemoteFilteringSampleComponent implements OnInit, AfterView
public remoteData: Observable<any[]>;
public noopFilterStrategy = NoopFilteringStrategy.instance();

private destroy$ = new Subject<boolean>();
private destroy$ = new Subject<void>();

constructor(private _remoteService: RemoteFilteringService, private _cdr: ChangeDetectorRef) {
}
Expand Down

0 comments on commit a37ef15

Please sign in to comment.