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

IonModal doesn't have "trigger" attribute

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 48983

Trending Articles



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