mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	feat(book/table): hide no children warning
This commit is contained in:
		| @@ -36,7 +36,21 @@ export default class BookTypeWidget extends TypeWidget { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     async doRefresh(note: FNote) { |     async doRefresh(note: FNote) { | ||||||
|         this.$helpNoChildren.toggle(!this.note?.hasChildren() && this.note?.getAttributeValue("label", "viewType") !== "calendar"); |         this.$helpNoChildren.toggle(this.shouldDisplayNoChildrenWarning()); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     shouldDisplayNoChildrenWarning() { | ||||||
|  |         if (this.note?.hasChildren()) { | ||||||
|  |             return false; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         switch (this.note?.getAttributeValue("label", "viewType")) { | ||||||
|  |             case "calendar": | ||||||
|  |             case "table": | ||||||
|  |                 return false; | ||||||
|  |             default: | ||||||
|  |                 return true; | ||||||
|  |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) { |     entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user