diff --git a/src/components/autocomplete/js/autocompleteDirective.js b/src/components/autocomplete/js/autocompleteDirective.js index 162aab37aef..51be58db9f5 100644 --- a/src/components/autocomplete/js/autocompleteDirective.js +++ b/src/components/autocomplete/js/autocompleteDirective.js @@ -35,11 +35,37 @@ angular * There is an example below of how this should look. * * ### Notes + * **Autocomplete Dropdown Items Rendering** + * * The `md-autocomplete` uses the the VirtualRepeat * directive for displaying the results inside of the dropdown.
+ * * > When encountering issues regarding the item template please take a look at the * VirtualRepeatContainer documentation. * + * **Autocomplete inside of a Virtual Repeat** + * + * When using the `md-autocomplete` directive inside of a + * VirtualRepeatContainer the dropdown items might + * not update properly, because caching of the results is enabled by default. + * + * The autocomplete will then show invalid dropdown items, because the VirtualRepeat only updates the + * scope bindings, rather than re-creating the `md-autocomplete` and the previous cached results will be used. + * + * > To avoid such problems ensure that the autocomplete does not cache any results. + * + * + * + * {{ item.display }} + * + * + * + * * * @param {expression} md-items An expression in the format of `item in results` to iterate over * matches for your search.