Skip to content

Commit 4f43635

Browse files
authored
Merge pull request #344 from Caltech-IPAC/IRSA-323-fix-cancel-button
IRSA-323: fix cancel button to dispatch id correctly to hide dialog
2 parents a3e11e0 + a69eee0 commit 4f43635

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/firefly/js/ui/DownloadDialog.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,18 @@ export class DownloadOptionPanel extends Component {
170170
}
171171

172172
render() {
173-
const {groupKey, cutoutSize, help_id, children, style} = this.props;
173+
const {groupKey, cutoutSize, help_id, children, style, title} = this.props;
174174
const {mask, sendEmail} = this.state;
175175
const labelWidth = 110;
176+
let ttl = title || DOWNLOAD_DIALOG_ID;
176177
return (
177178
<div style = {Object.assign({margin: '4px', position: 'relative', minWidth: 350}, style)}>
178179
{mask && <div style={{width: '100%', height: '100%'}} className='loading-mask'/>}
179180
<FormPanel
180181
submitText = 'Prepare Download'
181182
groupKey = {groupKey}
182183
onSubmit = {this.onSubmit}
183-
onCancel = {() => dispatchHideDialog(DOWNLOAD_DIALOG_ID)}
184+
onCancel = {() => dispatchHideDialog(ttl)}
184185
help_id = {help_id}>
185186
<FieldGroup groupKey={'DownloadDialog'} keepState={true}>
186187

0 commit comments

Comments
 (0)