-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[MdSelect] not rendering correctly with backend service #1262
Comments
Hey, can you try calling api before rendering? in |
@Samuell1 Thanks for the suggestion. Didn't work though. |
@emman27 do you get any errors in console? |
Tested it in created hook with fake api call and works https://codepen.io/anon/pen/eeoYpJ?editors=1010 Can you try removing async/await ? |
The only thing in console is
Which I believe means nothing. Seems like it might potentially be a browser issue. Check this out! (I'm not actually pressing anything) I swapped the async statement out for a Promise (then...catch) implementation and it didn't work either. |
yeah i had that infinite reloading few days ago too, try restarting browser @emman27 |
Ah I see. I think we have a bit of miscommunication. Here's the updated pen. (Sidenote: didn't work restarting browser/system, I just switched to another browser) |
You cant set v-model for that value that is not in array. |
Whoops silly me. Doesn't change the outcome though. Same result even if it's in the array |
I tested it without timeout nad works fine. https://codepen.io/anon/pen/QOPeyN?editors=1010 @emman27 do you have any loading on page? try showing select only after its loaded from api |
@Samuell1 Hey great idea it works! Proposing to keep this issue open until a permanent fix? |
Yes i leave it open. I now updating project to new vue-material and selects works fine with loading, thats why i ask if you have loading there to prevent rendering before its api loaded. |
Tested it with |
Proposing to leave issue open as low priority since it has to do with reactivity of the VueMaterial components. |
I found out it can be because |
I have an issue that I think is the same as this, but mine is with regards to "multiple" MdSelect. CodePen: https://codepen.io/andershjort/pen/qpoeyq I am not showing the select until after the data is loaded, but it still does not render correctly. The checkboxes in the dropdown are not checked |
|
Make options reactive via a hidden node. fix #1262
Steps to reproduce
Have an md-select with options coming from an endpoint. Options load correctly, values load correctly but doesn't display in the select box.
Which browser?
Chrome 62, Ubuntu 16.04
VueMaterial 1.0.0-beta-7
What is expected?
What is actually happening?
As can be seen, the v-model is correctly loading but the field remains empty (here this select in particular is a multiple, but it's also broken for the single selects)
Reproduction Link
Simplest repro:
The text was updated successfully, but these errors were encountered: