Skip to content

Commit

Permalink
Merge pull request #150 from openshift-cherrypick-robot/cherry-pick-1…
Browse files Browse the repository at this point in the history
…49-to-release-v1.15.x

[release-v1.15.x] SRVKP-5946: Close modal button is not working in dynamic plugin list pages
  • Loading branch information
openshift-merge-bot[bot] authored Aug 26, 2024
2 parents 0d79566 + e26b4d4 commit 6e1ec35
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 6e1ec35

Please sign in to comment.