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

[Fix] SingleSelect to update when items array is changed #773

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

Riippi
Copy link
Collaborator

@Riippi Riippi commented Sep 6, 2023

Description

Currently if the selected object in SingleSelect is updated elsewhere so that the label value is changed, the new value is updated to the popover list, but not in the input.
This PR fixes it so that the input value is also updated.

Related Issue

https://jira.dvv.fi/browse/SFIDS-852

Motivation and Context

This issue came from a project using SingleSelect in a form where some other input changes the item array.

How Has This Been Tested?

Styleguidist. New unit test.

There is a branch fix/singleselect-modify-selected-test that has an styleguidist example demoing this fix. It's identical to this PR except the .md file.

Release notes

SingleSelect

  • Fix input to show updated value when item array is changed

@Riippi Riippi added the bug Something isn't working label Sep 6, 2023
@Riippi Riippi self-assigned this Sep 6, 2023
Copy link
Collaborator

@jenkrisu jenkrisu left a comment

Choose a reason for hiding this comment

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

Nice work! 👍

@Riippi Riippi force-pushed the fix/singleselect-modify-selected branch from 1c5b342 to 608484f Compare September 13, 2023 09:25
@Riippi Riippi merged commit 5cb59e2 into develop Sep 13, 2023
@Riippi Riippi deleted the fix/singleselect-modify-selected branch September 13, 2023 10:05
@riitasointi riitasointi mentioned this pull request Dec 5, 2023
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

Successfully merging this pull request may close these issues.

2 participants