Skip to content

v-model is not updating the value  #65

@quantumass

Description

@quantumass

Bug

The v-model didn't work the value would disappear after I click on the option, I tried so many things with no success
here is an example
https://codesandbox.io/s/heuristic-cookies-q48ez9

Solution

After banging my head against the wall I discovered that the data should not be computed value
I was doing

<v-selectpage
  v-model="selectedClientId"
  :data="options.map(el => ({
      name: el.name,
      id: String(el.id)
    }))"
  placeholder=" "
  title=" "
/>

I should do

<v-selectpage
  v-model="selectedClientId"
  :data="options"
  key-field="id" 
  show-field="name"
  placeholder=" "
  title=" "
/>

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