-
Notifications
You must be signed in to change notification settings - Fork 3.4k
md-autocomplete / md-select support for ng-options #1563
Comments
+1! This Plunker shows the differences between a native select (with support for ng-options Demo using v0.8.0-rc1-master-eda14e9. Change comments in source to change to master. Note that in ng-options you can even apply a filter to the label in |
+1 This is EXACTLY what I needed except for this issue... If your items for the options are objects, you may want one field for the option drop-down and another for value (the object likely). However upon selection, md-select is using the ng-model (which is an object in this case). There should be a label (preferred) you can set on md-select or use the "display" value from the selected md-option instead of the ng-model. Note this is not the same as placeholder The plunker from Frank3K I think shows the issue. In case it is not clear (took me a second to see that it was the same issue) I created a more verbose example here: A syntax with label="name" might be a clean option <md-select ng-model="selectedFilter" label="name" placeholder="Select a filter"> |
@Frank3K's and @jadrake75's comments are about a different issue than the originally reported one. I think these should be separate issues. |
+1 |
+1 Also ran into this issue, basically I am coming from plain angular In my current angular approach I store a selected item's "t.id" in scope var "mydata.types_id", but I would like the user to see not the id but the textual name "t.name" of the type: |
Closing as duplicate of #1837. We agree it'd be great to have but you can achieve the same with ng-repeat for now. Regarding the display value, |
I just read the thread and it seems to me that the conversation was stolen by What about |
+1 for md-autocomplete |
+1 |
3 similar comments
+1 |
+1 |
+1 |
I am having major performance issues with ng-repeat inside md-select for very large drop downs. It takes a considerable amount of time to render the dom on first load (about 5 secs). Would having ng-options support in md-select improve performance? The parties object below is about a thousand objects.
|
It looks as if both the md-autocomplete and md-select directives do not have the ability to work with key/name pairs in the way that ng-options allows?
I want to be able to set the key in ng-value, and value in the display label. is this currently possible?
The text was updated successfully, but these errors were encountered: