diff --git a/src/public/app/widgets/collapsible_section_container.js b/src/public/app/widgets/collapsible_section_container.js index 355ec7a2b..ae80dfa1d 100644 --- a/src/public/app/widgets/collapsible_section_container.js +++ b/src/public/app/widgets/collapsible_section_container.js @@ -122,7 +122,7 @@ export default class CollapsibleSectionContainer extends TabAwareWidget { }); } - async refreshWithNote(note) { + async refreshWithNote(note, noExplicitActivation = false) { let $sectionToActivate, $lastActiveSection; this.$titleContainer.empty().append('
'); @@ -141,7 +141,7 @@ export default class CollapsibleSectionContainer extends TabAwareWidget { this.$titleContainer.append($sectionTitle); this.$titleContainer.append('
'); - if (ret.activate && !$sectionToActivate) { + if (ret.activate && !$sectionToActivate && !noExplicitActivation) { $sectionToActivate = $sectionTitle; } @@ -161,4 +161,8 @@ export default class CollapsibleSectionContainer extends TabAwareWidget { this.$bodyContainer.find('.section-body').removeClass("active"); } } + + refreshSectionContainerCommand() { + this.refreshWithNote(this.note, true); + } } diff --git a/src/public/app/widgets/type_property_widgets/promoted_attributes.js b/src/public/app/widgets/type_property_widgets/promoted_attributes.js index ec2b944ba..e8d1c39a8 100644 --- a/src/public/app/widgets/type_property_widgets/promoted_attributes.js +++ b/src/public/app/widgets/type_property_widgets/promoted_attributes.js @@ -293,6 +293,7 @@ export default class PromotedAttributesWidget extends TabAwareWidget { this.refresh(); this.renderTitle(this.note); + this.triggerCommand('refreshSectionContainer'); } } } diff --git a/src/public/app/widgets/type_widgets/attribute_list.js b/src/public/app/widgets/type_widgets/attribute_list.js deleted file mode 100644 index e69de29bb..000000000