Skip to content

Commit

Permalink
fix(plugins): adds close modal call (#52281)
Browse files Browse the repository at this point in the history
Close the modal after a user creates an issue

Fixes 52090
  • Loading branch information
Stephen Cefali authored Jul 5, 2023
1 parent a746bc4 commit 17f1837
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions static/app/components/group/pluginActions.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Component, Fragment} from 'react';

import {addErrorMessage, addSuccessMessage} from 'sentry/actionCreators/indicator';
import {ModalRenderProps, openModal} from 'sentry/actionCreators/modal';
import {closeModal, ModalRenderProps, openModal} from 'sentry/actionCreators/modal';
import {Client} from 'sentry/api';
import IssueSyncListElement from 'sentry/components/issueSyncListElement';
import NavTabs from 'sentry/components/navTabs';
Expand Down Expand Up @@ -87,13 +87,15 @@ class PluginActions extends Component<Props, State> {
);
};

handleModalClose = (data?: any) =>
handleModalClose = (data?: any) => {
this.setState({
issue:
data?.id && data?.link
? {issue_id: data.id, url: data.link, label: data.label}
: null,
});
closeModal();
};

openModal = () => {
const {issue} = this.state;
Expand Down

0 comments on commit 17f1837

Please sign in to comment.