Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale Segmented Button doesn't respect controlled selected state #2166

Open
goatfryed opened this issue Oct 16, 2023 · 1 comment
Open

Scale Segmented Button doesn't respect controlled selected state #2166

goatfryed opened this issue Oct 16, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@goatfryed
Copy link

Scale Version
3.0.0.beta-140

Framework and version
Vue with the standard scale webcomponents

Current Behavior
The segmented button does not respect changes to selected attribute of its children. This means that the change behavior breaks as soon as the selection gets updated from outside control.

Expected Behavior
Segmented Button should respect selected state and be usable as fully controlled component

Code Reproduction
[https://codesandbox.io/p/sandbox/nice-morse-y7gr9f?file=%2Fsrc%2FApp.vue]
In this example, the segmented button breaks as soon as we selected option b and click the button above to update state. The ui updates properly, but to trigger a change event, the first (selected) button must be clicked instead of the unselected one.

Additional context
I'm not sure if this is the same problem as #1862 and is covered by #1885 as well. It reads similar.

@goatfryed goatfryed added the bug Something isn't working label Oct 16, 2023
@felix-ico felix-ico self-assigned this Oct 16, 2023
@amir-ba
Copy link
Collaborator

amir-ba commented Oct 23, 2024

@goatfryed can you please check this with the latest version of Scale and let us know. , I assume this is already fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants