Vue-select: `createOption` is not creating an object

Created on 10 Apr 2020  路  3Comments  路  Source: sagalbot/vue-select

Describe the bug
When using createOption in 3.9.5 like this:

                                <v-select
                                    label="name"
                                    :options="foo"
                                    v-model="organization"
                                    taggable
                                    :create-option="org => ({ name: org})"
                                    id="newOrg"
                                >

organization is getting saved as a string and not an object.
To Reproduce
Steps to reproduce the behavior:

  1. Try a vue-select:
                                <v-select
                                    label="name"
                                    :options="foo"
                                    v-model="organization"
                                    taggable
                                    :create-option="org => ({ name: org})"
                                    id="newOrg"
                                >
  1. See the value of organization when you create a new one.

Expected behavior

organization: {
  name: "new org"
bug released tagging

Most helpful comment

That's a bug for sure. Reproduction here: https://codepen.io/sagalbot/pen/mdeyRGX?editors=1010

Will take a look today.

All 3 comments

That's a bug for sure. Reproduction here: https://codepen.io/sagalbot/pen/mdeyRGX?editors=1010

Will take a look today.

:tada: This issue has been resolved in version 3.9.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Sweet, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattWalters0 picture mattWalters0  路  3Comments

FrancescoMussi picture FrancescoMussi  路  3Comments

fabianmieller picture fabianmieller  路  3Comments

twz915 picture twz915  路  3Comments

NexoraSolutions picture NexoraSolutions  路  3Comments