Skip to content

Commit 6d56db9

Browse files
committed
update
1 parent ad28109 commit 6d56db9

File tree

1 file changed

+6
-5
lines changed
  • modules/genomic_browser/jsx/tabs_content

1 file changed

+6
-5
lines changed

modules/genomic_browser/jsx/tabs_content/files.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class Files extends Component {
3535
},
3636
};
3737
this.fetchData = this.fetchData.bind(this);
38+
this.formatColumn = this.formatColumn.bind(this);
3839
this.openFileUploadModal = this.openFileUploadModal.bind(this);
3940
this.closeFileUploadModal = this.closeFileUploadModal.bind(this);
4041
this.renderFileUploadForm = this.renderFileUploadForm.bind(this);
@@ -150,10 +151,12 @@ class Files extends Component {
150151
*/
151152
formatColumn(column, cell, rowData, rowHeaders) {
152153
let reactElement;
154+
console.log(rowData);
153155
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>;
157160
break;
158161
case 'Subproject':
159162
reactElement = <td>{this.state.data.subprojects[parseInt(cell)]}</td>;
@@ -258,12 +261,10 @@ class Files extends Component {
258261
);
259262
}
260263
}
261-
262264
Files.defaultProps = {
263265
display: false,
264266
data: null,
265267
};
266-
267268
Files.propTypes = {
268269
display: PropTypes.bool,
269270
data: PropTypes.object,

0 commit comments

Comments
 (0)