0

I am using the "Multiple Select Component" currently from JQuery. I just found out there is a Vue Version, but it adds a dependency to Jquery I do not like.

https://multiple-select.wenzhixin.net.cn/docs/en/introduction

Is there a native way to do this using VueJS 3.0 or any better replacement?

This is what I am going to achieve:

enter image description here

1 Answer 1

1

Yes, you can either create a new component for the dropdown/checkboxes or use a similar component from Vuetify: https://vuetifyjs.com/en/components/selects/#menu-props

For the new component, you could use somethig like this:

<div class="select">
  <ul>
    <li v-for="(option, index) in options" :key="index">
      <input type="checkbox" :id="index" :value="option.value" v-model="selected">
      <label :for="index">{{ option.anything }}</label>
    </li>
  </ul>
</div>

Here's the codepen, I do not own the code. https://codepen.io/huleos/pen/xQaYdK

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

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.