Skip to content

Commit 1ac195e

Browse files
committed
show all available files of project when scrolling on registration creation
1 parent 7c6933b commit 1ac195e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/app/features/registries/components/files-control/files-control.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
[storage]="null"
4747
[currentFolder]="currentFolder()!"
4848
[isLoading]="isFilesLoading()"
49-
[scrollHeight]="'200px'"
49+
[scrollHeight]="'500px'"
5050
[viewOnly]="filesViewOnly()"
5151
[resourceId]="projectId()"
5252
[provider]="provider()"

src/app/features/registries/store/handlers/files.handlers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,18 @@ export class FilesHandlers {
4040
files: {
4141
...state.files,
4242
isLoading: true,
43+
error: null,
44+
totalCount: 0,
4345
},
4446
});
4547

4648
return this.filesService.getFilesWithoutFiltering(filesLink, page).pipe(
4749
tap((response) => {
50+
const newData = page === 1 ? response.files : [...(state.files.data ?? []), ...response.files];
51+
4852
ctx.patchState({
4953
files: {
50-
data: response.files,
54+
data: newData,
5155
isLoading: false,
5256
error: null,
5357
totalCount: response.meta?.total ?? 0,

0 commit comments

Comments
 (0)