Skip to content

fix:#2400 infinite recursion in scale segmented button#2421

Merged
amir-ba merged 8 commits intotelekom:mainfrom
obstmi:fix/#2400-infinite-recursion-in-scale-segmented-button
Aug 28, 2025
Merged

fix:#2400 infinite recursion in scale segmented button#2421
amir-ba merged 8 commits intotelekom:mainfrom
obstmi:fix/#2400-infinite-recursion-in-scale-segmented-button

Conversation

@obstmi
Copy link
Contributor

@obstmi obstmi commented Aug 12, 2025

This fixes #2400, which was caused by an infinite loop of emitting and handling the scale-change event.
With this solution, emitting the event now depends on whether the state change was triggered by a user click or by a programmatic change of the selected attribute. In the latter case, emitting the scale-change event is suppressed.

@obstmi obstmi marked this pull request as draft August 13, 2025 07:27
@obstmi obstmi marked this pull request as ready for review August 16, 2025 07:19
Copy link
Collaborator

@amir-ba amir-ba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM tnx

@amir-ba amir-ba merged commit 9d7a9db into telekom:main Aug 28, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite recursion in ScaleSegment react component. onClick handler is called indefinitely.

2 participants