From e158788f4ea025f0f29aab8036b936517bc4d093 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tumanov Date: Sun, 29 Oct 2023 22:23:34 +0500 Subject: [PATCH] fix for mixins for grouping by custom attributes (#3898) Signed-off-by: Vyacheslav Tumanov --- .../src/components/ViewOptionsButton.svelte | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/view-resources/src/components/ViewOptionsButton.svelte b/plugins/view-resources/src/components/ViewOptionsButton.svelte index 7709810f5c..da9e6592c4 100644 --- a/plugins/view-resources/src/components/ViewOptionsButton.svelte +++ b/plugins/view-resources/src/components/ViewOptionsButton.svelte @@ -55,7 +55,15 @@ }) const customAttributes = classes - .flatMap((c) => Array.from(client.getHierarchy().getOwnAttributes(c).values())) + .flatMap((c) => { + const hierarchy = client.getHierarchy() + return hierarchy.isMixin(c) + ? [ + ...Array.from(hierarchy.getOwnAttributes(c).values()), + ...Array.from(hierarchy.getOwnAttributes(hierarchy.getBaseClass(c)).values()) + ] + : Array.from(client.getHierarchy().getOwnAttributes(c).values()) + }) .filter( (attr) => attr.isCustom && !attr.isHidden && [core.class.RefTo, core.class.EnumOf].includes(attr.type._class) )