Vue-select: Placeholder doesn't work

Created on 21 Jan 2021  路  2Comments  路  Source: sagalbot/vue-select

Placeholder doesn't work, so I updated my version, but still does'nt work.

My component is blank but still have options and the function got executed as well.

I'm using firefox dev version

Here's a piece of my code :

        <v-select
          id="department"
          label="department"
          class="shadow-sm"
          :options="$store.getters['localData/getDepartment']"
          :reduce="(value) => value.id"
          @input="sortEmployeesByDepartment"
          v-model="id_department"
          placeholder="Here is my placeholder">
        </v-select>

Most helpful comment

The issue is due to width in CSS, you have to define a width. Hope it will help someone.

All 2 comments

The issue is due to width in CSS, you have to define a width. Hope it will help someone.

You need to define width in the style.

<v-select
  style="width:250px"
  id="department"
  label="department"
  class="shadow-sm"
  :options="$store.getters['localData/getDepartment']"
  :reduce="(value) => value.id"
  @input="sortEmployeesByDepartment"
  v-model="id_department"
  placeholder="Here is my placeholder">
</v-select>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ducdev picture ducdev  路  3Comments

edalzell picture edalzell  路  3Comments

davidalvarezr picture davidalvarezr  路  3Comments

rafalolszewski94 picture rafalolszewski94  路  3Comments

rudykaze picture rudykaze  路  3Comments