Skip to content

Feature upgrade: UUI-select does not reflect value #1141

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

NguyenThuyLan
Copy link
Contributor

Description

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)

Motivation and context

The uui-select component receives an array of options. If one of the options has selected: true, then that will be the one selected.
That is not intuative, as a developer usually would set the value in this style:

const CountryOptions = [
  { value: "AD", name: "Andorra" },
  { value: "AE", name: "United Arab Emirates" },
  { value: "AL", name: "Albania" },
  { value: "AM", name: "Armenia" },
];

@property()
selectedCountry = "AM";

<uui-select
          label="Select country"
          placeholder="Select country..."
          value=${this.selectedCountry ?? ""}
          .options=${
            CountryOptions
          }
          @change=${this.#onCountryChanged}
        ></uui-select>

This PR is about making above work.

How to test?

Screenshots (if appropriate)

Checklist

  • If my change requires a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

Copy link

github-actions bot commented Jul 3, 2025

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1141.westeurope.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1141.westeurope.azurestaticapps.net

Copy link

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1141.westeurope.azurestaticapps.net

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.

1 participant