Skip to content

Commit

Permalink
Handled close modal button issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lokanandaprabhu committed Aug 7, 2024
1 parent 8c51e52 commit 42397a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/modals/LoadingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type LoadingModalProps = {
const LoadingModal: React.FC<LoadingModalProps> = ({ onClose }) => {
const { t } = useTranslation('plugin__pipelines-console-plugin');
return (
<ModalWrapper>
<ModalWrapper onClose={onClose}>
<LoadingBox />
<ModalFooter inProgress={false}>
<ActionGroup className="pf-v5-c-form pf-v5-c-form__actions--right pf-v5-c-form__group--no-top-margin">
Expand Down
7 changes: 6 additions & 1 deletion src/components/modals/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,14 @@ export const createModal: CreateModal = (getModalElement) => {
export const ModalWrapper: React.FC<ModalWrapperProps> = ({
className,
children,
onClose,
}) => {
return (
<Modal className={classNames('modal-dialog', className)} isOpen>
<Modal
className={classNames('modal-dialog', className)}
isOpen
onClose={() => onClose()}
>
{children}
</Modal>
);
Expand Down

0 comments on commit 42397a2

Please # to comment.