move request collection to ctor
This commit is contained in:
@@ -32,15 +32,11 @@ export class UmbCollectionDefaultElement extends UmbLitElement {
|
||||
super();
|
||||
this.consumeContext(UMB_COLLECTION_CONTEXT, (context) => {
|
||||
this.#collectionContext = context;
|
||||
this.#collectionContext?.requestCollection();
|
||||
this.#observeCollectionRoutes();
|
||||
});
|
||||
}
|
||||
|
||||
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
|
||||
super.firstUpdated(_changedProperties);
|
||||
this.#collectionContext?.requestCollection();
|
||||
}
|
||||
|
||||
#observeCollectionRoutes() {
|
||||
if (!this.#collectionContext) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user