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

auro-select: Allow choosing what value shows up as a selected item in the component #217

Open
dPopeAlaskaAir opened this issue Nov 6, 2024 · 1 comment
Labels
auro-select not-reviewed Issue has not been reviewed by Auro team members Type: Feature New Feature

Comments

@dPopeAlaskaAir
Copy link

Is your feature request related to a problem? Please describe.

In the case of a phone code, we would like to be able to display the country name in addition to the phone code in the dropdown. When a phone is selected, we don't want to display the full country, just the code

Describe the solution you'd like

Maybe have <auro-menuoption have 2 different values? 1 for display in the dropdown and another for what is shown when the value is selected.

Describe alternatives you've considered

No other options considered

Additional context

<auro-select
    aria-label="Phone Code"
    class="xs:tw-col-span-2 sm:tw-col-span-3 md:tw-col-span-2 lg:tw-col-span-2"
    value="1"
>
    <span slot="label">Code</span>
    <auro-menu>
        <auro-menuoption value="1">United States/Canada (+1)</auro-menuoption>
        <auro-menuoption value="506">Costa Rica (+506)</auro-menuoption>
        <auro-menuoption value="52">Mexico (+52)</auro-menuoption>
        <auro-menuoption value="93">Afghanistan (+93)</auro-menuoption>
        <auro-menuoption value="355">Albania (+355)</auro-menuoption>

image
@Patrick-Daly-AA
Copy link

Putting this into the backlog for @megrenn to assess where this fits into our product roadmap. Building in this functionality is complicated to do at the component level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auro-select not-reviewed Issue has not been reviewed by Auro team members Type: Feature New Feature
Projects
None yet
Development

No branches or pull requests

3 participants