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;
|
||||
}
|
||||
|
||||
const DEFAULT_EXCLUDED_KEYS = new Set([
|
||||
"point_codes",
|
||||
"source_point",
|
||||
"source_points",
|
||||
]);
|
||||
|
||||
export function ContentLinkAttributeSections({
|
||||
data,
|
||||
definitions = [],
|
||||
|
|
@ -40,10 +46,13 @@ export function ContentLinkAttributeSections({
|
|||
[presentationAttributes],
|
||||
);
|
||||
|
||||
const excluded = useMemo(
|
||||
() => new Set(excludeAttributeKeys.map((key) => bareAttributeKey(key))),
|
||||
[excludeAttributeKeys],
|
||||
);
|
||||
const excluded = useMemo(() => {
|
||||
const set = new Set<string>(DEFAULT_EXCLUDED_KEYS);
|
||||
for (const key of excludeAttributeKeys) {
|
||||
set.add(bareAttributeKey(key));
|
||||
}
|
||||
return set;
|
||||
}, [excludeAttributeKeys]);
|
||||
|
||||
const items = useMemo(() => {
|
||||
const roots = [...definitions]
|
||||
|
|
|
|||
Loading…
Reference in New Issue