add event listener first to make sure to catch all events

This commit is contained in:
Mads Rasmussen
2023-11-29 12:50:20 +01:00
parent 83e2e181bf
commit a0bb003aaa

View File

@@ -46,12 +46,12 @@ export class UmbDefaultCollectionContext<ItemType = any, FilterModelType extends
constructor(host: UmbControllerHostElement, config: UmbCollectionConfiguration = { pageSize: 50 }) {
super(host);
this.view = new UmbCollectionViewManager(this, { defaultViewAlias: config.defaultViewAlias });
this.#configure(config);
// listen for page changes on the pagination manager
this.pagination.addEventListener(UmbChangeEvent.TYPE, this.#onPageChange);
this.view = new UmbCollectionViewManager(this, { defaultViewAlias: config.defaultViewAlias });
this.#configure(config);
this.provideContext(UMB_COLLECTION_CONTEXT, this);
}