#11638 closed enhancement (fixed)
Allow lazy loading of DropDown widgets
Reported by: | Arlo White | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.6 |
Component: | Dijit | Version: | 1.5 |
Keywords: | DropDownButton | Cc: | [email protected]… |
Blocked By: | Blocking: |
Description
Currently DropDown? widgets must specify a dropDown at creation.
Imagine you have a web application with a hundred DropDownButtons?. Having to instantiate all the TooltipDialogs? just about doubles your load time. This shouldn't be necessary when the user will likely only click a few of the DropDownButtons?.
There should be a way to create a DropDownButton? that creates its dropDown only after it's clicked.
Maybe _HasDropDown should have a createDropDown method that it calls if this.dropDown doesn't exist. Or something along those lines...
This seems like it should be easy enough. There are only two places this.dropDown is referenced:
DropDownButton? references this.dropDown in its startup, this code would need to adjust for the case where dropDown is lazy-loaded.
_HasDropDown references it in toggleDropDown, this is where you would call your createDropDown code if not already created.
Change History (3)
comment:1 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
Milestone: | tbd → 1.6 |
---|
(In [22770]) fixes #11638: modify DropDownButton? to not assume dropDown is set upon creation of the button.
To lazy-load a dropdown menu, overwrite the default loadDropDown function to create the menu (and populate it) and attach it to this.dropDown