Skip to content

bug: wrong ion-segment-button class if no segement is checked initially  #21546

@NisStrom

Description

@NisStrom

Bug Report

Ionic version:
[x] 5.x

Current behavior:
If an ion-segment initially has no checked segment button, once you select the first segment it does not set the segment-button-after-checked class to the following segment. This is due to the fact that in segment.tsx the checkButton method requires a previous element.

Expected behavior:
The ion-segment-button after the checked button should have the CSS class segment-button-after-checked.

Steps to reproduce:

  1. Select second segment -> third segment should have class segment-button-after-checked

Related code:
https://stackblitz.com/edit/ionic-v4-angular-tabs-7kzv4u

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions