Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49082

Modal does not open when it is close clicking outside

$
0
0

Hello.

The following modal does not have a size that occupies the screen and when you click outside of it it is not possible to open it again. It can only be reopened if they are closed with IonIcon. How is it possible to fix this?

  export const ModalExample: React.FC = () => {
    const [showModal, setShowModal] = useState(false);
  
    return (
      <div>
        <IonModal isOpen={showModal} cssClass='my-custom-class' animated={true}>
        <IonIcon icon={closeCircle} onClick={() => setShowModal(false)}></IonIcon>
          <div id="contenedor-central" >
          <strong>Usuario no registrado</strong>
          </div>
          <IonButton onClick={() => setShowModal(false)}>Registrarse</IonButton>
        </IonModal>
        <IonChip onClick={() => setShowModal(true)} id="foto-usuario" >
          <IonIcon icon={person}/>
        </IonChip>
      </div>
    );
  };

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49082

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>