File tree 1 file changed +6
-5
lines changed
modules/genomic_browser/jsx/tabs_content
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ class Files extends Component {
35
35
} ,
36
36
} ;
37
37
this . fetchData = this . fetchData . bind ( this ) ;
38
+ this . formatColumn = this . formatColumn . bind ( this ) ;
38
39
this . openFileUploadModal = this . openFileUploadModal . bind ( this ) ;
39
40
this . closeFileUploadModal = this . closeFileUploadModal . bind ( this ) ;
40
41
this . renderFileUploadForm = this . renderFileUploadForm . bind ( this ) ;
@@ -150,10 +151,12 @@ class Files extends Component {
150
151
*/
151
152
formatColumn ( column , cell , rowData , rowHeaders ) {
152
153
let reactElement ;
154
+ console . log ( rowData ) ;
153
155
switch ( column ) {
154
- case 'PSCID' :
155
- const url = `${ this . props . baseURL } /${ rowData . DCCID } /` ;
156
- reactElement = < td > < a href = { url } > { rowData . PSCID } </ a > </ td > ;
156
+ case 'Name' :
157
+ const url = `${ this . props . baseURL } ${ rowData . Name } ` ;
158
+ const fileName = rowData . Name . split ( '/' ) . pop ( ) ;
159
+ reactElement = < td > < a href = { url } > { fileName } </ a > </ td > ;
157
160
break ;
158
161
case 'Subproject' :
159
162
reactElement = < td > { this . state . data . subprojects [ parseInt ( cell ) ] } </ td > ;
@@ -258,12 +261,10 @@ class Files extends Component {
258
261
) ;
259
262
}
260
263
}
261
-
262
264
Files . defaultProps = {
263
265
display : false ,
264
266
data : null ,
265
267
} ;
266
-
267
268
Files . propTypes = {
268
269
display : PropTypes . bool ,
269
270
data : PropTypes . object ,
You can’t perform that action at this time.
0 commit comments