fix(renderers): exclude point_codes and source_point from generic link sections
This commit is contained in:
parent
958229cb0c
commit
8b60e0f12f
|
|
@ -29,6 +29,12 @@ function containsNavigableReference(value: unknown): boolean {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DEFAULT_EXCLUDED_KEYS = new Set([
|
||||||
|
"point_codes",
|
||||||
|
"source_point",
|
||||||
|
"source_points",
|
||||||
|
]);
|
||||||
|
|
||||||
export function ContentLinkAttributeSections({
|
export function ContentLinkAttributeSections({
|
||||||
data,
|
data,
|
||||||
definitions = [],
|
definitions = [],
|
||||||
|
|
@ -40,10 +46,13 @@ export function ContentLinkAttributeSections({
|
||||||
[presentationAttributes],
|
[presentationAttributes],
|
||||||
);
|
);
|
||||||
|
|
||||||
const excluded = useMemo(
|
const excluded = useMemo(() => {
|
||||||
() => new Set(excludeAttributeKeys.map((key) => bareAttributeKey(key))),
|
const set = new Set<string>(DEFAULT_EXCLUDED_KEYS);
|
||||||
[excludeAttributeKeys],
|
for (const key of excludeAttributeKeys) {
|
||||||
);
|
set.add(bareAttributeKey(key));
|
||||||
|
}
|
||||||
|
return set;
|
||||||
|
}, [excludeAttributeKeys]);
|
||||||
|
|
||||||
const items = useMemo(() => {
|
const items = useMemo(() => {
|
||||||
const roots = [...definitions]
|
const roots = [...definitions]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue