mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 11:39:01 +01:00 
			
		
		
		
	update section container on attribute change, closes #1646
This commit is contained in:
		
							parent
							
								
									1af98056bb
								
							
						
					
					
						commit
						3b4fa0c5fc
					
				| @ -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('<div class="section-title section-title-empty">'); | ||||
| @ -141,7 +141,7 @@ export default class CollapsibleSectionContainer extends TabAwareWidget { | ||||
|             this.$titleContainer.append($sectionTitle); | ||||
|             this.$titleContainer.append('<div class="section-title section-title-empty">'); | ||||
| 
 | ||||
|             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); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -293,6 +293,7 @@ export default class PromotedAttributesWidget extends TabAwareWidget { | ||||
|             this.refresh(); | ||||
| 
 | ||||
|             this.renderTitle(this.note); | ||||
|             this.triggerCommand('refreshSectionContainer'); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam