diff --git a/openbis_ng_ui/src/js/components/common/grid/Grid.jsx b/openbis_ng_ui/src/js/components/common/grid/Grid.jsx index c11b023b4767faccd97eaf4b6e4742fda215c709..0f0f0726622dce31bdc02788a89415dd3cbc3aee 100644 --- a/openbis_ng_ui/src/js/components/common/grid/Grid.jsx +++ b/openbis_ng_ui/src/js/components/common/grid/Grid.jsx @@ -1,3 +1,4 @@ +import _ from 'lodash' import React from 'react' import autoBind from 'auto-bind' import { withStyles } from '@material-ui/core/styles' @@ -261,12 +262,12 @@ class Grid extends React.PureComponent { <React.Fragment> <GridExportLoading loading={!!exportState.loading} /> <GridExportError - open={!!exportState.error} + open={!_.isEmpty(exportState.error)} error={exportState.error} onClose={this.controller.handleExportCancel} /> <GridExportWarnings - open={!!exportState.warnings} + open={!_.isEmpty(exportState.warnings)} warnings={exportState.warnings} onDownload={() => this.controller.handleExportDownload( diff --git a/openbis_ng_ui/src/js/components/common/grid/GridController.js b/openbis_ng_ui/src/js/components/common/grid/GridController.js index c26493b0d7aecce44e425847a6c75c0d1cc3ecc4..fe886a6440d66e6c2d41874b468087d545550ccf 100644 --- a/openbis_ng_ui/src/js/components/common/grid/GridController.js +++ b/openbis_ng_ui/src/js/components/common/grid/GridController.js @@ -1348,7 +1348,7 @@ export default class GridController { }) if (exportResult.status === 'OK') { - const filePath = exportResult.result + const filePath = exportResult.result.file_name const fileName = filePath.substring(filePath.lastIndexOf('/') + 1) const fileUrl = '/openbis/download/?sessionID=' + @@ -1356,10 +1356,10 @@ export default class GridController { '&filePath=' + encodeURIComponent(filePath) - if (exportResult.warnings) { + if (!_.isEmpty(exportResult.result.warnings)) { this.context.setState({ exportState: { - warnings: exportResult.warnings, + warnings: exportResult.result.warnings, fileName, fileUrl }