Skip to content

Select is not updating the label when the v-model attribute is cleared #26

@laurengriffin

Description

@laurengriffin

Hi,

I have this following code

<div
  v-for="(selected, index) in data"
  :key="index"
>
  <vue-select
    v-model="data[index]"
    :data="dataOptions"
    placeholder="Select"
  >
    <vue-option
      v-for="option in dataOptions"
      :key="option.value"
      :value="option.value"
      :label="option.label"
    />
  </vue-select>
</div>

However, when I clear the data[index] for the corresponding index, the data is updated correctly but the label displayed stays the same and gives the illusion that the data wasn't cleared. Is there a way to update the label when the data in the v-model object is changed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions