Skip to content

Commit 3828a01

Browse files
fix: update layout trigger to emit on first layout (#345)
1 parent 2f413bd commit 3828a01

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Directive, Input, OnChanges } from '@angular/core';
2-
import { LayoutChangeService, TypedSimpleChanges } from '@hypertrace/common';
2+
import { LayoutChangeService } from '@hypertrace/common';
33

44
@Directive({
55
selector: '[htLayoutChangeTrigger]'
@@ -10,9 +10,7 @@ export class LayoutChangeTriggerDirective implements OnChanges {
1010
@Input('htLayoutChangeTrigger')
1111
public changeTrigger?: unknown;
1212

13-
public ngOnChanges(changeObject: TypedSimpleChanges<this>): void {
14-
if (changeObject.changeTrigger && !changeObject.changeTrigger.isFirstChange()) {
15-
setTimeout(() => this.layoutChange.publishLayoutChange());
16-
}
13+
public ngOnChanges(): void {
14+
setTimeout(() => this.layoutChange.publishLayoutChange());
1715
}
1816
}

0 commit comments

Comments
 (0)