diff --git a/core/src/components/segment-button/segment-button.tsx b/core/src/components/segment-button/segment-button.tsx index d12dc4369c..a92fcbbd31 100644 --- a/core/src/components/segment-button/segment-button.tsx +++ b/core/src/components/segment-button/segment-button.tsx @@ -166,10 +166,7 @@ export class SegmentButton implements ComponentInterface, ButtonInterface { {mode === 'md' && } -
+
diff --git a/core/src/components/segment-view/segment-view.tsx b/core/src/components/segment-view/segment-view.tsx index ffca4d5149..822a581266 100644 --- a/core/src/components/segment-view/segment-view.tsx +++ b/core/src/components/segment-view/segment-view.tsx @@ -39,7 +39,7 @@ export class SegmentView implements ComponentInterface { // Emit the scroll direction and distance this.ionSegmentViewScroll.emit({ scrollDirection, - scrollDistance + scrollDistance, }); const atSnappingPoint = scrollLeft % offsetWidth === 0; diff --git a/core/src/components/segment-view/test/disabled/segment-view.e2e.ts b/core/src/components/segment-view/test/disabled/segment-view.e2e.ts index c00d483090..6582b1e8c3 100644 --- a/core/src/components/segment-view/test/disabled/segment-view.e2e.ts +++ b/core/src/components/segment-view/test/disabled/segment-view.e2e.ts @@ -65,7 +65,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await expect(segmentContent).toBeInViewport(); }); - test('should scroll to the third content and update the segment value when the second segment content is disabled', async ({ page }) => { + test('should scroll to the third content and update the segment value when the second segment content is disabled', async ({ + page, + }) => { await page.setContent( ` diff --git a/core/src/components/segment/segment.tsx b/core/src/components/segment/segment.tsx index 5b72e59087..c184217b9c 100644 --- a/core/src/components/segment/segment.tsx +++ b/core/src/components/segment/segment.tsx @@ -374,8 +374,7 @@ export class Segment implements ComponentInterface { // Calculate the max and min allowed transformations based on the scroll direction const maxTransform = scrollDirection === 'left' ? 0 : segmentRect.width - buttonRect.width; - const minTransform = scrollDirection === 'left' ? - -(segmentRect.width - buttonRect.width) : 0; + const minTransform = scrollDirection === 'left' ? -(segmentRect.width - buttonRect.width) : 0; // Clamp the transform value to ensure it doesn't go out of bounds const clampedTransform = Math.max(minTransform, Math.min(transformValue, maxTransform));