Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

DDL flickers when items are refreshed #1314

Open
onemenny opened this issue Nov 22, 2015 · 5 comments
Open

DDL flickers when items are refreshed #1314

onemenny opened this issue Nov 22, 2015 · 5 comments

Comments

@onemenny
Copy link

When items source is refreshed the dropdown calculates the position. calculating the position uses timeout to set opacity=0/1 till the calculation ends. So if the user types something and items gets refreshed the ddl flickers on every key stroke.

@dimirc commited this change on sep30 abc4ce9?diff=unified

I cannot think on any reason to calculate the position on Items refresh, the way I see it, position should be set only on init (before drop is shown for the first time). None the less this is a bug that caused me to revert to version 0.12.1 instead of 0.13.*

@colinmorelli
Copy link

The current implementation sets top on the dropdown. Because of the fact that filtering can change the list of items in the dropdown, and thus the height may change, top would need to be reset after filtering.

Can this not easily be avoided by assigning bottom instead of top when the dropdown direction is up? Bottom would fix the bottom edge of the dropdown to the specified position, and the list would naturally expand up. This would remove the need to update the position during filter actions.

@shyamal890
Copy link

@colinmorelli Well the issue is still there. With 600 open issues, I wonder when this issue would be resolved. Anyways, looking at angular-ui typeahead may solve this. It has the same functionality, yet it doesn't flicker on item source refresh. @onemenny

@onemenny
Copy link
Author

onemenny commented Feb 9, 2016

@shyamal890 this is not the same control. look at my pull requests #1371 I already enhanced it with more bug fixes

@shyamal890
Copy link

@onemenny Ya, saw saw your commit afterwards, sorry.

@wesleycho
Copy link
Contributor

I would also recommend looking to UI Bootstrap's position service - it has solved most position issues. We would like to open source it as a separate module, perhaps even make it jqLite agnostic so that users can use it as a pure JS positioning service, as well as allow usage with ng2. Until then, it may be worth copying the implementation there to fix this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants