diff --git a/core/src/components/segment/segment.tsx b/core/src/components/segment/segment.tsx index 72464ad9d8..54ffb88047 100644 --- a/core/src/components/segment/segment.tsx +++ b/core/src/components/segment/segment.tsx @@ -213,6 +213,7 @@ export class Segment implements ComponentInterface { // If there are no checked buttons, set the current button to checked if (!checked) { this.value = clicked.value; + this.setCheckedClasses(); } // If the gesture began on the clicked button with the indicator @@ -375,8 +376,12 @@ export class Segment implements ComponentInterface { const previous = this.checked; this.value = current.value; - if (previous && this.scrollable) { - this.checkButton(previous, current); + if (this.scrollable) { + if (previous) { + this.checkButton(previous, current); + } else { + this.setCheckedClasses(); + } } this.checked = current;