Skip to content

Commit b1d3834

Browse files
fix: Fixed empty label and text in datareference semanticlink field (#528)
Co-authored-by: tumms2021389 <[email protected]>
1 parent 57652be commit b1d3834

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-sdk-components/src/components/field/SemanticLink/SemanticLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export default function SemanticLink(props: SemanticLinkProps) {
202202

203203
return (
204204
<Link component='button' {...linkComponentProps} {...restProps} onClick={openLinkClick} data-testid={testId}>
205-
{text}
205+
{text || '--'}
206206
</Link>
207207
);
208208
}

packages/react-sdk-components/src/components/infra/View/View.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function View(props: PropsWithChildren<ViewProps>) {
5656
const localeUtils = PCore.getLocaleUtils();
5757

5858
const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible
59-
if (isEmbeddedDataView && showLabel === undefined) {
59+
if ((isEmbeddedDataView && showLabel === undefined) || (template === 'DataReference' && inheritedProps.showLabel === undefined)) {
6060
showLabel = true;
6161
}
6262

0 commit comments

Comments
 (0)