pramod_Task-#239 : Display in Card View contacts List #121

Merged
vikas.nale merged 20 commits from pramod_Task-#239 into Feature_Directory 2025-05-19 07:29:19 +00:00
Showing only changes of commit c43c668fb8 - Show all commits

View File

@ -15,7 +15,7 @@ const GlobalModel = ({
useEffect(() => {
const modalElement = modalRef.current;
const modalInstance = new window.bootstrap.Modal(modalElement, {
backdrop: false // Disable backdrop
backdrop: false,
});
if (isOpen) {
@ -26,16 +26,27 @@ useEffect(() => {
const handleHideModal = () => {
closeModal();
// FIX: Remove any lingering body classes/styles
document.body.classList.remove('modal-open');
document.body.style.overflow = '';
document.body.style.paddingRight = '';
};
modalElement.addEventListener('hidden.bs.modal', handleHideModal);
return () => {
modalElement.removeEventListener('hidden.bs.modal', handleHideModal);
// Also clean up just in case component unmounts
document.body.classList.remove('modal-open');
document.body.style.overflow = '';
document.body.style.paddingRight = '';
};
}, [isOpen, closeModal]);
// Dynamically set the modal size classes (modal-sm, modal-lg, modal-xl)
const modalSizeClass = size ? `modal-${size}` : ''; // Default is empty if no size is specified