mirror of
				https://github.com/filebrowser/filebrowser.git
				synced 2025-10-31 17:23:09 +00:00 
			
		
		
		
	fix: no items displayed on file listing
This commit is contained in:
		
							parent
							
								
									73ccbe912f
								
							
						
					
					
						commit
						18889ad725
					
				| @ -254,6 +254,7 @@ | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| import Vue from "vue"; | ||||
| import { mapState, mapGetters, mapMutations } from "vuex"; | ||||
| import { users, files as api } from "@/api"; | ||||
| import { enableExec } from "@/utils/constants"; | ||||
| @ -279,6 +280,7 @@ export default { | ||||
|       showLimit: 50, | ||||
|       dragCounter: 0, | ||||
|       width: window.innerWidth, | ||||
|       itemWeight: 0, | ||||
|     }; | ||||
|   }, | ||||
|   computed: { | ||||
| @ -362,8 +364,14 @@ export default { | ||||
|       // Reset the show value | ||||
|       this.showLimit = 50; | ||||
| 
 | ||||
|       // Fill and fit the window with listing items | ||||
|       this.fillWindow(true); | ||||
|       // Ensures that the listing is displayed | ||||
|       Vue.nextTick(() => { | ||||
|         // How much every listing item affects the window height | ||||
|         this.setItemWeight(); | ||||
| 
 | ||||
|         // Fill and fit the window with listing items | ||||
|         this.fillWindow(true); | ||||
|       }); | ||||
|     }, | ||||
|   }, | ||||
|   mounted: function () { | ||||
| @ -813,6 +821,9 @@ export default { | ||||
|       } | ||||
|     }, | ||||
|     setItemWeight() { | ||||
|       // Listing element is not displayed | ||||
|       if (this.$refs.listing == null) return; | ||||
| 
 | ||||
|       let itemQuantity = this.req.numDirs + this.req.numFiles; | ||||
|       if (itemQuantity > this.showLimit) itemQuantity = this.showLimit; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ramires Viana
						Ramires Viana