Skip to content

Commit

Permalink
Update modal.component.tsx
Browse files Browse the repository at this point in the history
fix(update-modal-update): Fixed problem.
  • Loading branch information
sergeushenecz committed Jun 12, 2021
1 parent af715a9 commit 01ccf19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/ui/modal/modal.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export class Modal extends React.PureComponent<ModalProps, State> {
if (this.modalId && !this.props.visible) {
this.hide();
}

if (this.modalId && this.props.visible) {
ModalService.update(this.modalId, this.renderContentElement());
}
}

public componentWillUnmount(): void {
Expand Down Expand Up @@ -158,10 +162,6 @@ export class Modal extends React.PureComponent<ModalProps, State> {
};

public render(): React.ReactNode {
if (this.modalId && this.props.visible) {
ModalService.update(this.modalId, this.renderContentElement());
}

return null;
}
}
Expand Down

0 comments on commit 01ccf19

Please sign in to comment.