Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/components/file/browse/node-file-browse.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<bl-loading [status]="data.status | async">
<div>
<bl-entity-details-list #listWrapper [refresh]="list.refresh" [filterPlaceholder]="quicksearchPlaceholder" [showAddButton]="false"
[enableAdvancedFilter]="false" quickSearchField="name">
[enableAdvancedFilter]="false" quickSearchField="name" [loadMore]="list.loadMore">
<div pre-quicksearch class="folders">
<md-select placeholder="Filter by folder" [(ngModel)]="currentFolder">
<md-option [value]="null">All</md-option>
Expand All @@ -11,8 +11,8 @@
</md-select>
</div>

<bl-node-file-list #list [poolId]="poolId" [nodeId]="node.id" [filter]="listWrapper.filter" [quickList]="false" [folder]="currentFolder">
<bl-node-file-list #list [poolId]="poolId" [nodeId]="node.id" [filter]="listWrapper.filter" [quickList]="false" [folder]="currentFolder" [manualLoading]="true">
</bl-node-file-list>
</bl-entity-details-list>
</bl-entity-details-list>
</div>
</bl-loading>
2 changes: 1 addition & 1 deletion app/components/file/browse/node-file-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class NodeFileListComponent implements OnInit, OnChanges {

public ngOnInit() {
return;
}
}

public ngOnChanges(inputs) {
if (inputs.poolId || inputs.nodeId || inputs.folder || inputs.filter) {
Expand Down
1 change: 1 addition & 0 deletions app/services/core/rx-batch-list-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class RxBatchListProxy<TParams, TEntity> extends RxListProxy<TParams, TEn
}

protected handleChanges(params: any, options: any) {
this._nextLink = null;
this._loadedFirst = false;
}

Expand Down
2 changes: 1 addition & 1 deletion app/services/core/rx-list-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export abstract class RxListProxy<TParams, TEntity> extends RxProxyBase<TParams,
return this.fetchNextItems();
},
next: (response: any) => {
this._hasMore.next(this.hasMoreItems());
const keys = OrderedSet(this.newItems(this.processResponse(response)));
this._hasMore.next(this.hasMoreItems());
const currentKeys = this._itemKeys.getValue();
if (currentKeys.size === 0) {
this.cache.queryCache.cacheQuery(this._options.filter, keys, this.putQueryCacheData());
Expand Down
8 changes: 8 additions & 0 deletions test/app/services/core/rx-batch-list-proxy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@ describe("RxBatchListProxy", () => {
proxy.fetchNext();
tick();
expect(items).toEqualImmutable(List(updatedData[0].map((x) => new FakeModel(x))));
expect(hasMore).toBe(false);
}));

it("should return hasMore false if there is only 1 page of data after first fetch", fakeAsync(() => {
proxy.setOptions({ filter: "filter2" });
proxy.fetchNext();
tick();
expect(hasMore).toBe(false);
}));

it("Should remove item from the list when the cache call onItemDeleted", fakeAsync(() => {
Expand Down