feat: cascade ion-segment mode to ion-segment-button children
See original GitHub issueFeature Request
Ionic version: [x] 4.x
Describe the Feature Request
I think it would be cool to cascade the mode
attribute from an ion-segment
to its ion-segment-button
children
Right now, if I want to use only the md
style, on iOS I have to explicitly specify the mode
not only on the parent segment but also on all children
For example:
<ion-segment [(ngModel)]="category" mode="md"> <!-- Render style class MD on iOS -->
<ion-segment-button value="segment_1" checked> <!-- Render style class iOS on iOS -->
Segment 1
</ion-segment-button>
<ion-segment-button value="segment_2"> <!-- Render style class iOS on iOS -->
Segment 2
</ion-segment-button>
</ion-segment>
To apply md
everywhere I have currently to do the following:
<ion-segment [(ngModel)]="category" mode="md"> <!-- Render style class MD on iOS -->
<ion-segment-button ... mode="md"> <!-- Render style class md on iOS -->
Segment 1
</ion-segment-button>
<ion-segment-button ... mode="md"> <!-- Render style class md on iOS -->
Segment 2
</ion-segment-button>
</ion-segment>
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
cascade ion-segment mode to ion-segment-button children ...
feat (components): cascade mode from parent to child components (#19369) … 55462d7.
Read more >ion-segment-button - Ionic Framework
ion-segment -buttons are groups of related buttons inside of a Segment. Learn to use segment button icons and check their values on Ionic...
Read more >Is there a way to make ion-segment look the same on both iOS ...
I have tried setting the mode of ion-segment and ion-toolbar to "md" but they still look different. https://ibb.co/HV75Ly2 Here is an image of ......
Read more >Comparing v4.11.0...v4.11.2 · ionic-team/ionic-framework · GitHub
feat (components): cascade mode from parent to child components (#19369) … fixes #18285 · @brandyscarney · brandyscarney committed ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m going to close this since the PR has been merged, we’ll have an RC out with this in it soon 🙂
@brandyscarney sweet, thx for having a look at this 👍