From 9ed1f6a125a23bd2d2d539bd5b9d066553fb3cd4 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 4 Jul 2024 13:34:23 +0800 Subject: [PATCH] bugfix --- bricks/accordion.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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); }