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

v-select doesn't have a placeholder #1382

Closed
bartoszmagier opened this issue Aug 17, 2017 · 7 comments
Closed

v-select doesn't have a placeholder #1382

bartoszmagier opened this issue Aug 17, 2017 · 7 comments
Assignees
Labels
T: bug Functionality that does not work as intended/expected T: enhancement Functionality that enhances existing features
Milestone

Comments

@bartoszmagier
Copy link

bartoszmagier commented Aug 17, 2017

Steps to reproduce

Set up placeholder prop on v-select

Versions

0.14.8

What is expected?

Placeholder should be visible like in v-text-field.

What is actually happening?

Placeholder is missing.

Reproduction Link

https://codepen.io/bartoszmagier/pen/MvzgGG

@flybayer
Copy link

In the documentation, placeholder is a prop for v-select, but it's not actually working for me.

@johnleider
Copy link
Member

When creating an issue you should be provided with boilerplate for the ticket. This is important for myself and others to properly address your issue. Please reopen this with the required information, thank you.

@Lirt
Copy link

Lirt commented Aug 27, 2017

There is actually a typo and placeholder is placholder (Props - https://vuetifyjs.com/components/selects). But it is not working for me either.

@bartoszmagier
Copy link
Author

@johnleider Please reopen the issue.

@nekosaur nekosaur reopened this Aug 29, 2017
@nekosaur nekosaur added the pending review The issue is still pending disposition label Aug 29, 2017
@Lirt
Copy link

Lirt commented Aug 29, 2017

Currently I am able to setup default values (placeholders ) with this sample code https://codepen.io/anon/pen/vJQYOy. So setting v-model to some data variable and changing it for example in mounted works fine. Note that item you are setting as default must exist in items bind.

When I tried to use placeholder/placholder instead of model as in @pelek sample, it does not work - https://codepen.io/anon/pen/GvwgYa

The way this can be the most usable in my opinion is if we can use computed value or vuex getter in placeholder argument. Or second option if we were able to use computed value or vuex getter in v-model (not sure if this is not against vue architecture).

The reason is we can get placeholder value from complex nested objects located in vuex store or wherever.

Example use

template:

<v-select
  v-bind:items="selector-items"
  label="Item selector"
  placeholder="getSelectorPlaceholder"
></v-select>

script:

data () {
  return {
    selector-items: [{
      'text': 'item1',
      'value': '1'
      }, {
      'text': 'item2',
      'value': '1'
      }
    ],
    placeholderItem: '2' //find value in selector items
  }
}
computed: {
  getSelectorPlaceholder: function () {
    return this.placeholderItem
  }
}

@johnleider johnleider self-assigned this Aug 30, 2017
@johnleider johnleider added T: bug Functionality that does not work as intended/expected T: enhancement Functionality that enhances existing features and removed pending review The issue is still pending disposition labels Aug 30, 2017
@johnleider johnleider added this to the v0.15.0 milestone Aug 30, 2017
@Lirt
Copy link

Lirt commented Aug 30, 2017

Thank you John 👍

@lock
Copy link

lock bot commented Apr 16, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

@lock lock bot locked as resolved and limited conversation to collaborators Apr 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: bug Functionality that does not work as intended/expected T: enhancement Functionality that enhances existing features
Projects
None yet
Development

No branches or pull requests

5 participants