question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: cascade ion-segment mode to ion-segment-button children

See original GitHub issue

Feature 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:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
brandyscarneycommented, Oct 8, 2019

I’m going to close this since the PR has been merged, we’ll have an RC out with this in it soon 🙂

1reaction
peterpeterparkercommented, Sep 25, 2019

@brandyscarney sweet, thx for having a look at this 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found