@@ -142,14 +142,25 @@ const DatasetDetail = ({
142
142
if ( pocLinks ) { pocLinks = pocLinks . split ( ';' ) ; }
143
143
const sortedAdditonals = sortingAdditionalElement ( content ) ;
144
144
const grantIDs = [ ] ;
145
+ const grantNames = [ ] ;
145
146
const grants = new Map ( ) ;
146
147
if ( sortedAdditonals ) {
147
148
if ( sortedAdditonals . includes ( "GRANT ID" ) ) {
148
149
additionalDict [ "GRANT ID" ] . forEach ( ( item , i ) => {
149
150
grantIDs [ i ] = item . k ;
150
- grants . set ( item . k , additionalDict [ "GRANT NAME" ] [ i ] . k ) ;
151
151
} ) ;
152
152
}
153
+ if ( sortedAdditonals . includes ( "GRANT NAME" ) ) {
154
+ additionalDict [ "GRANT NAME" ] . forEach ( ( item , i ) => {
155
+ grantNames [ i ] = item . k ;
156
+ } ) ;
157
+ }
158
+ for ( let i = 0 ; i < grantIDs . length ; i += 1 ) {
159
+ if ( grantNames [ i ] === null ) {
160
+ grants . set ( grantIDs [ i ] , "" ) ;
161
+ }
162
+ grants . set ( grantIDs [ i ] , grantNames [ i ] ) ;
163
+ }
153
164
}
154
165
useEffect ( ( ) => {
155
166
if ( ! content ) {
@@ -788,8 +799,14 @@ const DatasetDetail = ({
788
799
< table className = "table table-borderless" >
789
800
< tbody >
790
801
< tr >
791
- { item ? < td width = "210px" > < div className = "grantIDDataContainer" > { item } </ div > </ td > : null }
792
- { grants . get ( item ) ? < td > < div className = "grantNameDataContainer" > { grants . get ( item ) } </ div > </ td > : null }
802
+ < td width = "210px" style = { { paddingLeft : "0px" } } >
803
+ < div >
804
+ {
805
+ item . split ( ',' ) . join ( ",\n" )
806
+ }
807
+ </ div >
808
+ </ td >
809
+ < td > < div className = "grantNameDataContainer" > { grants . get ( item ) } </ div > </ td >
793
810
</ tr >
794
811
</ tbody >
795
812
</ table >
0 commit comments