Fix exiting dialog
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
		
					parent
					
						
							
								2537088099
							
						
					
				
			
			
				commit
				
					
						dc3cc33893
					
				
			
		
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -54,7 +54,10 @@ export function Modal({
 | 
			
		|||
  ...rest
 | 
			
		||||
}: ModalProps) {
 | 
			
		||||
  const modalRef = useRef();
 | 
			
		||||
  const { overlayProps, underlayProps } = useOverlay(rest, modalRef);
 | 
			
		||||
  const { overlayProps, underlayProps } = useOverlay(
 | 
			
		||||
    { ...rest, onClose },
 | 
			
		||||
    modalRef
 | 
			
		||||
  );
 | 
			
		||||
  usePreventScroll();
 | 
			
		||||
  const { modalProps } = useModal();
 | 
			
		||||
  const { dialogProps, titleProps } = useDialog(rest, modalRef);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue