1

Can we make ionic2 segments header scroll to the clicked segment header

<div>
    <ion-scroll #scroll scrollX="true" class="browse-item-scrollx">
        <ion-segment  [(ngModel)]="pet" color="primary">
            <ion-segment-button (click)="goto(0)" value="1" tappable>
                1
            </ion-segment-button>
            <ion-segment-button (click)="goto(1)" value="2" tappable>
                2
            </ion-segment-button>
            <ion-segment-button (click)="goto(2)" value="3" tappable>
                3
            </ion-segment-button>
            <ion-segment-button (click)="goto(3)" value="4" tappable>
                4
            </ion-segment-button>
        </ion-segment>
    </ion-scroll>

</div>

the 1st,2nd segments headers are visible ; 3rd segment header is half visible ; 4th is not visible.So when the user click on 3rd segment header,it should scroll and 3rd segment header should be fully visible.Is it possible to do so.

deep dalvi
  • 119
  • 1
  • 1
  • 17
  • 1
    I'm afraid that's not possible by default in Ionic, but you could implement it like in this **[StackOverflow answer](https://stackoverflow.com/questions/45157896/ionic-horizontal-scroll-tab-for-categories/45158789#45158789)**. – sebaferreras Jan 21 '18 at 08:39
  • hey. did you manage to find a solution for this ? – Scobee Dec 21 '18 at 23:04

0 Answers0