Show only attributes of selected class (#1904)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-05-29 16:54:32 +07:00 committed by GitHub
parent f8cf26f640
commit 15d3a2baab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,8 @@
$: attributes = getCustomAttributes(_class)
function getCustomAttributes (_class: Ref<Class<Doc>>): AnyAttribute[] {
const attributes = Array.from(hierarchy.getAllAttributes(_class, core.class.AttachedDoc).values())
const cl = hierarchy.getClass(_class)
const attributes = Array.from(hierarchy.getAllAttributes(_class, cl.extends).values())
const filtred = attributes.filter((p) => !p.hidden)
return filtred
}