File tree 1 file changed +6
-2
lines changed
static/app/components/modals 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ function MetricWidgetViewerModal({
46
46
Body,
47
47
Header,
48
48
closeModal,
49
+ CloseButton,
49
50
onMetricWidgetEdit,
50
51
dashboardFilters,
51
52
} : Props ) {
@@ -227,13 +228,17 @@ function MetricWidgetViewerModal({
227
228
return (
228
229
< Fragment >
229
230
< OrganizationContext . Provider value = { organization } >
230
- < Header closeButton >
231
+ < Header >
231
232
< MetricWidgetTitle
232
233
title = { title }
233
234
onTitleChange = { handleTitleChange }
234
235
placeholder = { widgetMQL }
235
236
description = { widget . description }
236
237
/>
238
+ { /* Added a div with onClick because CloseButton overrides passed onClick handler */ }
239
+ < div onClick = { handleSubmit } >
240
+ < CloseButton />
241
+ </ div >
237
242
</ Header >
238
243
< Body >
239
244
< Queries
@@ -269,7 +274,6 @@ function MetricWidgetViewerModal({
269
274
>
270
275
{ t ( 'Open in Metrics' ) }
271
276
</ LinkButton >
272
- < Button onClick = { closeModal } > { t ( 'Close' ) } </ Button >
273
277
< Button priority = "primary" onClick = { handleSubmit } >
274
278
{ t ( 'Save changes' ) }
275
279
</ Button >
You can’t perform that action at this time.
0 commit comments