File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/react-sdk-components/src/components/template/SimpleTable/SimpleTableManual Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,8 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
146146 const [ displayDialogDateFilter , setDisplayDialogDateFilter ] = useState < string > ( 'notequal' ) ;
147147 const [ displayDialogDateValue , setDisplayDialogDateValue ] = useState < string > ( '' ) ;
148148 const selectedRowIndex : any = useRef ( null ) ;
149-
149+ const localizedVal = PCore . getLocaleUtils ( ) . getLocaleValue ;
150+ const localeCategory = 'SimpleTable' ;
150151 const parameters = fieldMetadata ?. datasource ?. parameters ;
151152 const { referenceListStr } = getContext ( getPConnect ( ) ) ;
152153 const label = labelProp || propertyLabel ;
@@ -708,7 +709,7 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
708709 } ) }
709710 </ TableBody >
710711 </ Table >
711- { rowData && rowData . length === 0 && (
712+ { ( ( readOnlyMode && ( ! rowData || rowData ? .length === 0 ) ) || ( editableMode && ( ! referenceList || referenceList ?. length === 0 ) ) ) && (
712713 < div className = 'no-records' id = 'no-records' >
713714 No records found.
714715 </ div >
@@ -717,7 +718,7 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
717718 { showAddRowButton && (
718719 < div style = { { fontSize : '1rem' } } >
719720 < Link style = { { cursor : 'pointer' } } onClick = { addRecord } underline = 'hover' >
720- + Add
721+ + { localizedVal ( ' Add' , localeCategory ) }
721722 </ Link >
722723 </ div >
723724 ) }
You can’t perform that action at this time.
0 commit comments