I'm trying to develop a generic dropdown kind that allows dynamically reloading the list of options. See
jsfiddle.net/kenpaul/YMUkN/ for an example, including a sample App that invokes it. As currently coded, the app generates 2 dropdowns, both of which scroll and select properly when loaded. Changing the selection in dropdown 1 causes a new list of options to be loaded in dropdown 2, at which point only the first few items show, and scrolling is apparently disabled. I've tried using render() or not in both reloadItems() and itemSelected() and haven't found a combination that works correctly both initially and after reloading. It looks like render() breaks the scrolling, but I hope that's wrong. Any help would be appreciated.
Comments
The fix is in your code. In your reloadItems() call, instead of calling
this.render();
callthis.$.ddpick.render();
instead. This focuses the re-rendering on the list inside of the popup, rather than the decorator and all the things that own the layers above the list. This avoids triggering the bug. However, I'll file an issue to track this problem so your original code would work too.http://jsfiddle.net/YMUkN/7/