Closed freedomson closed 11 years ago
I did the following patch
diff --git a/ux/AccordionList.js b/ux/AccordionList.js index 173f02e..9c3d9e2 100644 --- a/ux/AccordionList.js +++ b/ux/AccordionList.js @@ -345,6 +345,21 @@ Ext.define('Ext.ux.AccordionList', { }, /** + * Collapse all of contents. + */ + doSingleCollapse: function(record) { + var me = this; + me.doAll(function collapse(node) { + if(node.data.depth==record.data.depth) + node.collapse(); + console.log(node); + /*if (!node.isLeaf()) { + node.childNodes.forEach(collapse, me); + }*/ + }); + }, + + /** * @private * @param {Function} updater */ @@ -403,7 +418,7 @@ Ext.define('Ext.ux.AccordionList', { } else { if(me.getSingleMode()) { - me.doAllCollapse(); + me.doSingleCollapse(record); } node.expand();
freedomson,
Sorry to my slow response, thank you for the patch. It's wonderful!
I've merged this patch for project. Good job ;)
I did the following patch