I want the IonModal to open when I click the IonIcon.
<IonIcon id="open-modal" icon={calendar} slot="start"/>
<IonModal trigger="open-modal">
<IonContent>
<IonDatetime></IonDatetime>
</IonContent>
</IonModal>
Right now the trigger property is giving me this error.
TS2322: Type '{ children: Element; trigger: string; }' is not assignable to type 'IntrinsicAttributes & Pick<ModalOptions<ComponentRef>, "id" | "mode" | ... etc.
Property 'trigger' does not exist on type 'IntrinsicAttributes & Pick<ModalOptions<ComponentRef>, "id" | "mode" | ... etc.
I looked at the declaration for IonModal in ionic/react and indeed I don’t see the trigger attribute. Has this not been implemented or something? I’m confused because it shows a working example just like this in the documentaiton.
^ referenced documentation
1 post - 1 participant