Skip to content

Instantly share code, notes, and snippets.

@sdesai
Created September 12, 2011 18:02
Show Gist options
  • Save sdesai/1211940 to your computer and use it in GitHub Desktop.
Save sdesai/1211940 to your computer and use it in GitHub Desktop.
Async Queue Usage Example
var tree = new Y.ParentWidget({
id: "tree"
});
tree.plug(Y.SM.Plugin.WidgetParentRenderQueue, {timeout:2000});
tree.add([
{ type: Y.ChildWidget, id: "leaf-1", label: "Leaf One" },
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Two" },
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Three" },
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Four" },
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Five" },
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Six" },
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Seven" },
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Eight" },
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Nine" },
{ type: Y.ChildWidget, id: "leaf-2", label: "Leaf Ten" }
]);
tree.render();
@sdesai
Copy link
Author

sdesai commented Sep 12, 2011

tree.render(); tree.add(); does bring out the issue. The above snippet doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment