Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for mixins for grouping by custom attributes #3898

Merged
merged 2 commits into from
Oct 29, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions plugins/view-resources/src/components/ViewOptionsButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,16 @@
descriptor: viewlet.descriptor,
variant: viewlet.variant ? viewlet.variant : { $exists: false }
})

const hierarchy = client.getHierarchy()
ThetaDR marked this conversation as resolved.
Show resolved Hide resolved
const customAttributes = classes
.flatMap((c) => Array.from(client.getHierarchy().getOwnAttributes(c).values()))
.flatMap((c) =>
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)
)
Expand Down
Loading