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

Select multiple populate options from HTTP request #151

Open
alexvndre opened this issue Sep 4, 2017 · 0 comments
Open

Select multiple populate options from HTTP request #151

alexvndre opened this issue Sep 4, 2017 · 0 comments

Comments

@alexvndre
Copy link

alexvndre commented Sep 4, 2017

Hi,

I would populate my options array with results from an HTTP request but I ran into an error when I added the property "multiple".
The HTML select:

<v-select v-model="select.value" :options="select.options" options-value="val"
                      multiple name="animals[]"
                      placeholder="Using placeholder"
                      search justified required
                      clear-button
></v-select>

The JS which is in an HTTP response callbacl:

let i = 0;
this.select.options = [];

while (i < 10) {
    this.select.options.push({
        val: i,
        label: 'toto',
    });
    i += 1;
}

The error is <select multiple v-model="val"> expects an Array value for its binding, but got Null.

Thanks!

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

No branches or pull requests

1 participant