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

Request: Add Disabled Option to Select #1413

Closed
MELindley opened this issue Sep 24, 2019 · 2 comments
Closed

Request: Add Disabled Option to Select #1413

MELindley opened this issue Sep 24, 2019 · 2 comments
Milestone

Comments

@MELindley
Copy link

Hi, it would be great to be able to add a disabled option in the Metro_4 select, currently the disabled attribute seems to be ignored when building the replacement select.

Thanks for your work on this great library !

@olton
Copy link
Owner

olton commented Sep 24, 2019

added in 4.3.1. You can use disabled attribute for option:

<select id="my-select" data-role="select" data-add-empty-value="true" data-placeholder="Select value..." data-empty-value="-1">
    <option value="1">Value 1</option>
    <option value="2" disabled>Value 2</option>
    <option value="3">Value 3</option>
    <option value="4">Value 4</option>
</select>

@olton olton added this to the v4.3.1 milestone Sep 24, 2019
@olton olton closed this as completed Sep 25, 2019
@CEVR88
Copy link

CEVR88 commented Apr 14, 2022

Hi, but, the select element, by itself, can´t be disabled? I don´t want the user can be able to dropdown the select until it double clicks on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants