Building a multi-select control

The typeahead control we've just built is used for most of the complex fields on the create product form, but for the features of that product, we've used a multi-select control instead. We won't be supporting the addition of new features on the fly, so the user will only be able to select from the preexisting list.

Create an empty ClientApp/components/shared/MultiSelect.vue file, and then start the template section off with the following:

<template>  <form-input-base :label="label">    <div class="multi-select">      <input        ref="input"        :value="text"        :name="name"        :class="classes"        @focus="focus"        @blur="blur"        @keydown.prevent="keydown" />        ...    </div>  </form-input-base></template>

Again, this should look pretty familiar ...

Get ASP.NET Core 2 and Vue.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.