Hi! I’ve been trying to close a IonItemSliding through the React api but until now i haven’t got it working
<IonItemSliding>
<IonItem routerLink={link}>
<IonLabel>
{props.name}
</IonLabel>
</IonItem>
<IonItemOptions side="end">
<IonItemOption
onClick={event => {
addToFavorites(props);
}}
>
<IonIcon slot="start" icon={heart}></IonIcon>Favorite
</IonItemOption>
</IonItemOptions>
</IonItemSliding>
When i click the option the code to add the favorites runs but i haven’t been able to access the sliding item.
I’ve tried:
event.target.something()
event.currentTarget.something()
But i can’t seem to find its reference
Thanks!