Skip to content

Commit 06b615c

Browse files
committed
fix: could not set custom asset list config
1 parent d8200ae commit 06b615c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/data/src/files/asset-list/asset-list.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import AssetResource from 'ec.sdk/lib/resources/datamanager/AssetResource';
1111
export class AssetList extends ResourceList<PublicAssetResource | AssetResource> {
1212

1313
constructor(config: ListConfig<PublicAssetResource | AssetResource>, protected sdk: SdkService, protected fileService: FileService) {
14-
super(Object.assign(config, fileService.assetListConfig));
15-
this.load();
14+
super(Object.assign({}, fileService.assetListConfig, config));
15+
this.load(this.config);
1616
}
1717

1818
/** Overrides the List load method. Instead of slicing the page out of all items, a datamanager request is made using the config.*/
@@ -22,11 +22,11 @@ export class AssetList extends ResourceList<PublicAssetResource | AssetResource>
2222
}
2323
this.useConfig(config);
2424
const loading = this.sdk.api.assetList(this.getFilterOptions(this.config))
25-
.then((list) => {
26-
this.use(list);
27-
}).catch((err) => {
28-
this.error.next(err);
29-
});
25+
.then((list) => {
26+
this.use(list);
27+
}).catch((err) => {
28+
this.error.next(err);
29+
});
3030
this.loading.next(loading);
3131
return loading;
3232
}

0 commit comments

Comments
 (0)