collection is working
This commit is contained in:
@@ -62,10 +62,12 @@ export class UmbUserGroupCollectionViewElement extends UmbLitElement {
|
||||
super();
|
||||
|
||||
this.consumeContext(UMB_COLLECTION_CONTEXT_TOKEN, (instance) => {
|
||||
this.#collectionContext = instance as UmbUserGroupCollectionContext;
|
||||
this.#collectionContext = instance;
|
||||
this.observe(this.#collectionContext.selection, (selection) => (this._selection = selection));
|
||||
this.observe(this.#collectionContext.items, (items) => {
|
||||
this._userGroups = items;
|
||||
console.log('items', items);
|
||||
|
||||
this._createTableItems(items);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { UmbEntityData } from './entity.data';
|
||||
import { UserGroupPresentationModel } from '@umbraco-cms/backoffice/backend-api';
|
||||
import { PagedUserGroupPresentationModel, UserGroupPresentationModel } from '@umbraco-cms/backoffice/backend-api';
|
||||
|
||||
// Temp mocked database
|
||||
class UmbUserGroupsData extends UmbEntityData<UserGroupPresentationModel> {
|
||||
@@ -7,8 +7,11 @@ class UmbUserGroupsData extends UmbEntityData<UserGroupPresentationModel> {
|
||||
super(data);
|
||||
}
|
||||
|
||||
getAll() {
|
||||
return this.data;
|
||||
getAll(): PagedUserGroupPresentationModel {
|
||||
return {
|
||||
total: this.data.length,
|
||||
items: this.data,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user