File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
src/app/[locale]/viewer/_components
submodel/generic-submodel Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 66 SubmodelElementChoice ,
77 Property ,
88 MultiLanguageProperty ,
9+ SubmodelElementList ,
910} from 'lib/api/aas/models' ;
1011import { findSubmodelElementBySemanticIdsOrIdShort , getTranslationText } from 'lib/util/SubmodelResolverUtil' ;
1112import {
@@ -31,7 +32,7 @@ export type FileViewObject = {
3132 * @param submodelElement
3233 * @param submodelId
3334 */
34- export function useFileViewObject ( submodelElement : SubmodelElementCollection , submodelId : string ) {
35+ export function useFileViewObject ( submodelElement : SubmodelElementCollection | SubmodelElementList , submodelId : string ) {
3536 const locale = useLocale ( ) ;
3637 const { aasOriginUrl } = useCurrentAasContext ( ) ;
3738 const [ fileViewObject , setFileViewObject ] = useState < FileViewObject > ( ) ;
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ export function MarkingsComponent(props: MarkingsComponentProps) {
2020 let additionalText : Property | undefined ;
2121
2222 let idShortPath = '' ;
23- if ( props . submodelElement ?. idShort ) {
23+ if ( props . submodelElement ?. modelType == 'SubmodelElementList' ) {
24+ idShortPath = props . submodelElement ?. idShort + encodeURIComponent ( '[' + index . toString ( ) + ']' ) ;
25+ } else if ( props . submodelElement ?. idShort ) {
2426 idShortPath = props . submodelElement ?. idShort + '.' + el . idShort ;
2527 }
2628
Original file line number Diff line number Diff line change 1- import { SubmodelElementCollection } from 'lib/api/aas/models' ;
1+ import { SubmodelElementCollection , SubmodelElementList } from 'lib/api/aas/models' ;
22import { idEquals } from 'lib/util/IdValidationUtil' ;
33import { submodelElementCustomVisualizationMap } from '../../submodel-elements/SubmodelElementCustomVisualizationMap' ;
44import { Fragment } from 'react' ;
@@ -7,7 +7,7 @@ import { SubmodelVisualizationProps } from 'app/[locale]/viewer/_components/subm
77import { KeyTypes } from 'lib/api/aas/models' ;
88
99export interface CustomSubmodelElementComponentProps {
10- readonly submodelElement : SubmodelElementCollection ;
10+ readonly submodelElement : SubmodelElementCollection | SubmodelElementList ;
1111 readonly hasDivider : boolean ;
1212 readonly submodelId : string ;
1313 readonly repositoryUrl ?: string ;
You can’t perform that action at this time.
0 commit comments