-
Notifications
You must be signed in to change notification settings - Fork 3.4k
autocomplete: Wrong height is set for md-virtual-repeat-container #6668
Comments
This is the same issue I think- In the input box, hit backspace twice. You'll see the new height isn't recalculated properly. |
As a workaround- adding this into your getSuggestions function seems to work
|
👍 |
1 similar comment
+1 |
This seems to be related to #5611 |
It's still happening in 1.1.1 |
+1 |
Still happening.. not sure why these features are "offered" in the documentation when their basic use case functionalities are broken.. |
@gbaj Your suggestion worked perfectly for me. In my case, I identified and made available via scope in link as follows:
Then, in my directives controller during my onBlur event:
|
This is still around, although I've noticed for my particular use case it was only triggering the wrong height when the list was temporarily empty, and "md-not-found" was used. When removing md-not-found I could no longer trigger a bad height. This is possibly related to being called from a remote service. |
This appears to be fixed in 1.1.0 and seems to still be working properly in 1.1.7. Here's an updated CodePen for 1.1.0. If you are seeing a similar problem against 1.1.7, please open a new issue. |
Hi,
When focusing on an autocomplete field, sometimes the rendered suggestion list is shrunk to show only one item, whereas there are more items on the list. This happens quite randomly, sometimes more often than this particular demo (gif):
I tried to debug this, but led to no results unfortunately. Here is my findings (sorry if it doesn't help much):
Setting a new height is triggered at
VirtualRepeatController.prototype.containerUpdated
whenvirtualRepeatUpdate_
method is called. The problem, I think, arises when theitems
(referred to the list of suggestions) sent to this method is an empty array.Moreover, when the
items
array is correct, through the chain calls, atVirtualRepeatContainerController.prototype.autoShrink_
,setSize_
method is never called, which seem to solve the problem if it did.The text was updated successfully, but these errors were encountered: