Skip to content

Commit

Permalink
Merge pull request #149 from lokanandaprabhu/feature/SRVKP-5936
Browse files Browse the repository at this point in the history
SRVKP-5936: Close modal button is not working in dynamic plugin list pages
  • Loading branch information
openshift-merge-bot[bot] committed Aug 7, 2024
2 parents dbe40ff + 42397a2 commit 6f886d8
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 6f886d8

Please # to comment.