0

I'm trying to implement this "filtered dropdown" pattern for mobile users:

enter image description here

By default, of course, a <select> control is closed, until the user clicks it open.

Is there a simple way to keep it always open? I understand it wouldn't strictly be a "dropdown" then - more like a traditional Windows "list" control.

(Multiple select is not appropriate for this application).

I'm using VueJS if that's relevant.

My current code:

    <p>Start typing your suburb name...</p>
    <input type="text" length="50" v-model="suburbFilter">
    <br>
    <select id="suburb-select" v-model="suburb" >
        <option v-for="suburb in filteredSuburbs">
            {{ suburb }}
        </option>
    </select>
6

2 Answers 2

1

i use this component https://paliari.github.io/v-autocomplete/, it's pretty customizable

Sign up to request clarification or add additional context in comments.

Comments

0

If it's always open, then you could use <input type="radio">.

Create a filterable list a la: https://www.w3schools.com/howto/howto_js_filter_lists.asp

Then, instead of the <a> tags they're using, you can style a radio input in place of it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.