diff --git a/bricks/accordion.js b/bricks/accordion.js index cd4bde3..695d3c6 100644 --- a/bricks/accordion.js +++ b/bricks/accordion.js @@ -37,8 +37,9 @@ bricks.Accordion = class extends bricks.VBox { this.items.push(b); this.add_widget(b); } - this.content = new bricks.VBox({}); - this.content.set_css('filler'); + this.content = new bricks.Filler({}); + this.sub_container = new bricks.VScrollPanel({height:'100%'}); + this.content.add_widget(this.sub_container); } async change_content(event){ var refresh = false; @@ -61,8 +62,8 @@ bricks.Accordion = class extends bricks.VBox { c = await bricks.widgetBuild(this.opts.items[pos].content); this.subcontents[name] = c; } - this.content.clear_widgets(); - this.content.add_widget(c); + this.sub_container.clear_widgets(); + this.sub_container.add_widget(c); try { this.remove_widget(this.content); }