remove individual sort handling
This commit is contained in:
@@ -116,13 +116,7 @@ export class UmbEditorEntityLayout extends UmbContextConsumerMixin(LitElement) {
|
||||
|
||||
this._editorViewsSubscription = this._extensionRegistry
|
||||
?.extensionsOfType('editorView')
|
||||
.pipe(
|
||||
map((extensions) =>
|
||||
extensions
|
||||
.filter((extension) => extension.meta.editors.includes(this.alias))
|
||||
.sort((a, b) => b.meta.weight - a.meta.weight)
|
||||
)
|
||||
)
|
||||
.pipe(map((extensions) => extensions.filter((extension) => extension.meta.editors.includes(this.alias))))
|
||||
.subscribe((editorViews) => {
|
||||
this._editorViews = editorViews;
|
||||
this._createRoutes();
|
||||
|
||||
@@ -92,9 +92,7 @@ export class UmbSectionDashboards extends UmbContextConsumerMixin(LitElement) {
|
||||
?.extensionsOfType('dashboard')
|
||||
.pipe(
|
||||
map((extensions) =>
|
||||
extensions
|
||||
.filter((extension) => extension.meta.sections.includes(this._currentSectionAlias))
|
||||
.sort((a, b) => b.meta.weight - a.meta.weight)
|
||||
extensions.filter((extension) => extension.meta.sections.includes(this._currentSectionAlias))
|
||||
)
|
||||
)
|
||||
.subscribe((dashboards) => {
|
||||
|
||||
@@ -48,14 +48,13 @@ export class UmbSectionTrees extends UmbContextConsumerMixin(LitElement) {
|
||||
if (!section) return EMPTY;
|
||||
|
||||
return (
|
||||
this._extensionStore?.extensionsOfType('tree').pipe(
|
||||
map((trees) =>
|
||||
trees
|
||||
.filter((tree) => tree.meta.sections.includes(section.alias))
|
||||
.sort((a, b) => b.meta.weight - a.meta.weight)
|
||||
.map((tree) => tree.alias)
|
||||
)
|
||||
) ?? of([])
|
||||
this._extensionStore
|
||||
?.extensionsOfType('tree')
|
||||
.pipe(
|
||||
map((trees) =>
|
||||
trees.filter((tree) => tree.meta.sections.includes(section.alias)).map((tree) => tree.alias)
|
||||
)
|
||||
) ?? of([])
|
||||
);
|
||||
})
|
||||
)
|
||||
|
||||
@@ -72,13 +72,7 @@ export class UmbSectionElement extends UmbContextConsumerMixin(LitElement) {
|
||||
return (
|
||||
this._extensionRegistry
|
||||
?.extensionsOfType('tree')
|
||||
.pipe(
|
||||
map((trees) =>
|
||||
trees
|
||||
.filter((tree) => tree.meta.sections.includes(section.alias))
|
||||
.sort((a, b) => b.meta.weight - a.meta.weight)
|
||||
)
|
||||
) ?? of([])
|
||||
.pipe(map((trees) => trees.filter((tree) => tree.meta.sections.includes(section.alias)))) ?? of([])
|
||||
);
|
||||
})
|
||||
)
|
||||
|
||||
@@ -90,11 +90,9 @@ export class UmbTreeContextMenuPageActionListElement extends UmbContextConsumerM
|
||||
}
|
||||
|
||||
private _renderActions() {
|
||||
return this._actions
|
||||
.sort((a, b) => a.meta.weight - b.meta.weight)
|
||||
.map((action) => {
|
||||
return html`<umb-tree-item-action-extension .treeAction=${action}></umb-tree-item-action-extension> `;
|
||||
});
|
||||
return this._actions.map((action) => {
|
||||
return html`<umb-tree-item-action-extension .treeAction=${action}></umb-tree-item-action-extension> `;
|
||||
});
|
||||
}
|
||||
|
||||
disconnectedCallback(): void {
|
||||
|
||||
@@ -20,9 +20,7 @@ export class UmbSectionStore {
|
||||
this._allowedSection = data.sections;
|
||||
*/
|
||||
|
||||
return this._extensionRegistry
|
||||
?.extensionsOfType('section')
|
||||
.pipe(map((extensions) => extensions.sort((a, b) => b.meta.weight - a.meta.weight)));
|
||||
return this._extensionRegistry?.extensionsOfType('section');
|
||||
}
|
||||
|
||||
public setCurrent(alias: string) {
|
||||
|
||||
Reference in New Issue
Block a user