Skip to content

Commit

Permalink
EPMRPP-83058 || The 'Delete widget' modal is not closed when clicking…
Browse files Browse the repository at this point in the history
… on the 'Delete' button while widget is loading (#3800)

* EPMRPP-83058 | Get widgetType from props

* EPMRPP-83058 | formatting

* EPMRPP-83058 | closeModal => closeModalWithConfirmation

* EPMRPP-83058 | closeModal => closeModalWithConfirmation

---------

Co-authored-by: maria-hambardzumian <[email protected]>
  • Loading branch information
maria-hambardzumian and MariaHambardzumian authored Apr 15, 2024
1 parent 75da269 commit e42f6fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/components/main/modal/modalLayout/modalLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class ModalLayout extends Component {
closeModalWithOk = () => {
const { closeConfirmation } = this.props;
if (closeConfirmation?.confirmSubmit) {
this.closeModal();
this.closeModalWithConfirmation();
} else {
this.setState({ shown: false });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,11 @@ export class SimpleWidget extends Component {

tracking.trackEvent(DASHBOARD_PAGE_EVENTS.REMOVE_WIDGET);
const onConfirm = () => {
const { widgetId, activeDashboardId } = this.props;
const { widgetId, activeDashboardId, widgetType } = this.props;
const {
widget: { id, widgetType },
widget: { id },
} = this.state;

onDelete(widgetId);
if (isAnalyticsEnabled) {
provideEcGA({
Expand Down

0 comments on commit e42f6fd

Please sign in to comment.