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

Dynamic population of md-select not working #1334

Closed
djackson77 opened this issue Dec 23, 2017 · 1 comment
Closed

Dynamic population of md-select not working #1334

djackson77 opened this issue Dec 23, 2017 · 1 comment

Comments

@djackson77
Copy link

I'm trying to create a component around md-select that dynamically creates the content list after the component is first instantiated. This seems to be causing problems.

To reproduce:

  1. Run the fiddle (This is a modification of one of the CodePen examples in the vue-material docs.)
  2. Click "Populate recList". recList sources a v-for in the md-select, and at start of execution, it's empty. This button puts objects into it. The md-select UI properly shows the new values, but the default value for the v-modelled variable "movie" (Godfather) isn't being displayed.
  3. Now click on the md-select pulldown and select "Godfather". Still nothing happens.
  4. Now click "Set Value", which changes "movie" to "Fight Club". Again nothing happens in the UI, because in this failure state, the v-model appears to be ignoring changes to "movie".
  5. Go back to the md-select UI and try to select "Fight Club". Again nothing happens, because having altered the value of "movie" with the button, you're once again using the md-select to set the value already in place. Makes some sense, except the md-select doesn't show the value.
  6. Now: use the md-select to select anything other than "Fight Club". All is right again; you can now use both the button and the md-select UI properly.

This doesn't seem correct behavior to me, and it also doesn't seem like I'm doing something that shouldn't be supported. Am I missing a configuration, or is this an issue? Thanks.

Which browser? Chrome v63

@Samuell1
Copy link
Member

Duplicate of: #1262

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

2 participants