Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SRVKP-5936: Close modal button is not working in dynamic plugin list pages #149

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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