controller aliases

This commit is contained in:
Niels Lyngsø
2023-08-28 12:57:38 +02:00
parent 962f3ec10d
commit 45fa296f25
2 changed files with 14 additions and 3 deletions

View File

@@ -51,12 +51,12 @@ export class UmbCollectionSelectionActionsElement extends UmbLitElement {
// TODO: Make sure it only updates on length change.
this.observe(this._collectionContext.items, (mediaItems) => {
this._nodesLength = mediaItems.length;
});
}, 'observeItem');
this.observe(this._collectionContext.selection, (selection) => {
this._selectionLength = selection.length;
this._selection = selection;
});
}, 'observeSelection');
}
private _renderSelectionCount() {
@@ -74,6 +74,7 @@ export class UmbCollectionSelectionActionsElement extends UmbLitElement {
(bulkActions) => {
this._entityBulkActions = bulkActions;
}
, 'observeEntityBulkActions'
);
}

View File

@@ -1,7 +1,17 @@
import { UmbDatasetContext } from "./dataset-context.interface.js";
import { UmbVariantId } from "@umbraco-cms/backoffice/variant";
/**
* A dataset context for a variant.
*
* @notes
* This one will depending on the origin of such deliver:
* - name
* - a variant id
* - a workspace reference
* - save state (this should depend on the workspace, this will become another superset of the dataset)
* - publish state (this should depend on the workspace, this will become another superset of the dataset)
*/
export interface UmbVariantDatasetContext extends UmbDatasetContext {
getVariantId: () => UmbVariantId;
}