mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	fixed order of multi-valued promoted attributes, closes #4105
This commit is contained in:
		
							parent
							
								
									f8c9178c5d
								
							
						
					
					
						commit
						e4892c9888
					
				
							
								
								
									
										1
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -5,7 +5,6 @@ | |||||||
|   "requires": true, |   "requires": true, | ||||||
|   "packages": { |   "packages": { | ||||||
|     "": { |     "": { | ||||||
|       "name": "trilium", |  | ||||||
|       "version": "0.60.4", |       "version": "0.60.4", | ||||||
|       "hasInstallScript": true, |       "hasInstallScript": true, | ||||||
|       "license": "AGPL-3.0-only", |       "license": "AGPL-3.0-only", | ||||||
|  | |||||||
| @ -73,6 +73,10 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
| 
 | 
 | ||||||
|         const promotedDefAttrs = note.getPromotedDefinitionAttributes(); |         const promotedDefAttrs = note.getPromotedDefinitionAttributes(); | ||||||
|         const ownedAttributes = note.getOwnedAttributes(); |         const ownedAttributes = note.getOwnedAttributes(); | ||||||
|  |         // attrs are not resorted if position changes after the initial load
 | ||||||
|  |         // promoted attrs are sorted primarily by order of definitions, but with multi-valued promoted attrs
 | ||||||
|  |         // the order of attributes is important as well
 | ||||||
|  |         ownedAttributes.sort((a, b) => a.position < b.position ? -1 : 1); | ||||||
| 
 | 
 | ||||||
|         if (promotedDefAttrs.length === 0) { |         if (promotedDefAttrs.length === 0) { | ||||||
|             this.toggleInt(false); |             this.toggleInt(false); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam