Skip to content
Snippets Groups Projects
Commit 5f122b75 authored by Xiao Gui's avatar Xiao Gui
Browse files

fix: feature overflow

fix: feature datasource pulling
parent 380d3c50
No related branches found
No related tags found
No related merge requests found
import { AfterViewInit, Component, OnDestroy, QueryList, TemplateRef, ViewChildren } from '@angular/core';
import { AfterViewInit, ChangeDetectorRef, Component, OnDestroy, QueryList, TemplateRef, ViewChildren } from '@angular/core';
import { select, Store } from '@ngrx/store';
import { debounceTime, distinctUntilChanged, map, scan, shareReplay, switchMap, take, withLatestFrom } from 'rxjs/operators';
import { IDS, SAPI } from 'src/atlasComponents/sapi';
......@@ -65,7 +65,7 @@ export class EntryComponent extends FeatureBase implements AfterViewInit, OnDest
@ViewChildren(CategoryAccDirective)
catAccDirs: QueryList<CategoryAccDirective>
constructor(private sapi: SAPI, private store: Store, private dialog: MatDialog) {
constructor(private sapi: SAPI, private store: Store, private dialog: MatDialog, private cdr: ChangeDetectorRef) {
super()
}
......@@ -235,6 +235,7 @@ export class EntryComponent extends FeatureBase implements AfterViewInit, OnDest
if ((datasource.currentValue.length - scrollIndex) < 30) {
try {
await datasource.pull()
this.cdr.detectChanges()
} catch (e) {
if (e instanceof IsAlreadyPulling || e instanceof DsExhausted) {
return
......
......@@ -193,7 +193,7 @@
mat-button
class="virtual-scroll-item sxplr-w-100"
(click)="onClickFeature(feature)">
{{ feature.name }}
<span class="ws-no-wrap"> {{ feature.name }} </span>
</button>
<div *ngIf="last && datasource.isPulling$ | async">
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment