File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
packages/react-sdk-components/src/components
template/SingleReferenceReadOnly Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff 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 ) || ( template === 'DataReference' && inheritedProps . showLabel === undefined ) ) {
59+ if ( isEmbeddedDataView && showLabel === undefined ) {
6060 showLabel = true ;
6161 }
6262
Original file line number Diff line number Diff line change 1+ import { FormControl , FormLabel } from '@mui/material' ;
12import type { PConnProps } from '../../../types/PConnProps' ;
23
34interface SingleReferenceReadOnlyProps extends PConnProps {
@@ -59,5 +60,12 @@ export default function SingleReferenceReadOnly(props: SingleReferenceReadOnlyPr
5960 { }
6061 ) ; // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
6162
62- return < > { component } </ > ;
63+ return (
64+ < >
65+ < FormControl variant = 'standard' sx = { { display : 'flex' , flexDirection : 'row' } } >
66+ < FormLabel sx = { { marginRight : '2rem' } } > { label } </ FormLabel >
67+ { component }
68+ </ FormControl >
69+ </ >
70+ ) ;
6371}
You can’t perform that action at this time.
0 commit comments