Issue
I'm trying to set a specific segment button as active and I've been searching around on how to do this. It seems to be possible with Angular/Ionic, but I'm using React and am unable to find the React answer.
Here's the code:
<IonItem>
<IonText>Status<IonText color="danger">*</IonText></IonText>
<IonSegment id="event_status">
<IonSegmentButton value="close">
<IonLabel>Close</IonLabel>
</IonSegmentButton>
<IonSegmentButton value="open">
<IonLabel>Open</IonLabel>
</IonSegmentButton>
</IonSegment>
</IonItem>
I want to set the close button as the active button
Solution
As it Worked for you posting as answer so other can get help too:
Try to set value on your main <IonSegment id="event_status" value="close">
tag.
Hope it will work
Answered By - Najam Us Saqib
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.