Fix intersaction Observer in fos-selections.
This commit is contained in:
parent
2f98910712
commit
3e12962add
|
@ -72,8 +72,9 @@ export class FosSelectionComponent {
|
||||||
} else {
|
} else {
|
||||||
this.activeSection = this.fos[0].id;
|
this.activeSection = this.fos[0].id;
|
||||||
}
|
}
|
||||||
|
if(typeof IntersectionObserver !== "undefined") {
|
||||||
this.setObserver();
|
this.setObserver();
|
||||||
|
}
|
||||||
this.cdr.detectChanges();
|
this.cdr.detectChanges();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -93,7 +94,7 @@ export class FosSelectionComponent {
|
||||||
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
||||||
this.keyword = value;
|
this.keyword = value;
|
||||||
this.findMatches(this.keyword);
|
this.findMatches(this.keyword);
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof IntersectionObserver !== 'undefined') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setObserver();
|
this.setObserver();
|
||||||
});
|
});
|
||||||
|
|
|
@ -105,7 +105,7 @@ export class FosComponent implements OnInit, OnDestroy {
|
||||||
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
|
||||||
this.keyword = value;
|
this.keyword = value;
|
||||||
this.findMatches(this.keyword);
|
this.findMatches(this.keyword);
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof IntersectionObserver !== 'undefined') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setObserver();
|
this.setObserver();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue