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

[Select] Selected option label is not visible #30

Open
demtario opened this issue May 12, 2020 · 3 comments
Open

[Select] Selected option label is not visible #30

demtario opened this issue May 12, 2020 · 3 comments

Comments

@demtario
Copy link

I'm trying to render options list based on data from async operation (setTimeout in example below). So I created simple v-for on <vs-option> to gets options that I want.

Options are visible, you can change selected option and value changes. But label of selected option is not visible.

image

Example

https://codesandbox.io/s/still-snowflake-kgjsv?file=/src/App.vue

@mhrahul
Copy link

mhrahul commented Aug 7, 2020

I am sticking with exactly same problem. Need solution urgently. Otherwise cant use new version.

@bchalk101
Copy link

bchalk101 commented Sep 6, 2020

I ran into this issue, as a workaround, I have given the vs-option a key that is based on the list - this way every time the key updates the entire component will be rerendered by Vue, and the values will be displayed.

<vs-select :key="list.length">
              <vs-option
                      v-for="field in list"
                      :key="field.name"
                      :label="field.name"
                      :value="field.name"
              >
                {{ field.name }}
              </vs-option>
</vs-select>

@alfgago
Copy link

alfgago commented Sep 17, 2020

I ran into this issue, as a workaround, I have given the vs-option a key that is based on the list - this way every time the key updates the entire component will be rerendered by Vue, and the values will be displayed.

<vs-select :key="list.length">
              <vs-option
                      v-for="field in list"
                      :key="field.name"
                      :label="field.name"
                      :value="field.name"
              >
                {{ field.name }}
              </vs-option>
</vs-select>

Had the same issue. This was really helpful, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants