mirror of
				https://github.com/mickael-kerjean/filestash.git
				synced 2025-11-04 13:35:46 +08:00 
			
		
		
		
	fix (table): missing loader
This commit is contained in:
		@ -4,6 +4,7 @@ import { qs, qsa } from "../../lib/dom.js";
 | 
				
			|||||||
import ajax from "../../lib/ajax.js";
 | 
					import ajax from "../../lib/ajax.js";
 | 
				
			||||||
import { loadCSS } from "../../helpers/loader.js";
 | 
					import { loadCSS } from "../../helpers/loader.js";
 | 
				
			||||||
import t from "../../locales/index.js";
 | 
					import t from "../../locales/index.js";
 | 
				
			||||||
 | 
					import { createLoader } from "../../components/loader.js";
 | 
				
			||||||
import { get as getPlugin } from "../../model/plugin.js";
 | 
					import { get as getPlugin } from "../../model/plugin.js";
 | 
				
			||||||
import ctrlError from "../ctrl_error.js";
 | 
					import ctrlError from "../ctrl_error.js";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -39,6 +40,7 @@ export default async function(render, { mime, getDownloadUrl = nop, getFilename
 | 
				
			|||||||
        thead: qs($page, ".thead"),
 | 
					        thead: qs($page, ".thead"),
 | 
				
			||||||
        tbody: qs($page, ".tbody"),
 | 
					        tbody: qs($page, ".tbody"),
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					    const removeLoader = createLoader(qs($page, ".component_table_container"));
 | 
				
			||||||
    const padding = 10;
 | 
					    const padding = 10;
 | 
				
			||||||
    const STATE = {
 | 
					    const STATE = {
 | 
				
			||||||
        header: {},
 | 
					        header: {},
 | 
				
			||||||
@ -57,7 +59,9 @@ export default async function(render, { mime, getDownloadUrl = nop, getFilename
 | 
				
			|||||||
            STATE.header = table.getHeader();
 | 
					            STATE.header = table.getHeader();
 | 
				
			||||||
            STATE.body = table.getBody();
 | 
					            STATE.body = table.getBody();
 | 
				
			||||||
            STATE.rows = STATE.body;
 | 
					            STATE.rows = STATE.body;
 | 
				
			||||||
 | 
					        }),
 | 
				
			||||||
 | 
					        removeLoader,
 | 
				
			||||||
 | 
					        rxjs.tap(() => {
 | 
				
			||||||
            buildHead(STATE, $dom, padding);
 | 
					            buildHead(STATE, $dom, padding);
 | 
				
			||||||
            buildRows(STATE.rows.slice(0, MAX_ROWS), STATE.header, $dom.tbody, padding, true, false);
 | 
					            buildRows(STATE.rows.slice(0, MAX_ROWS), STATE.header, $dom.tbody, padding, true, false);
 | 
				
			||||||
        }),
 | 
					        }),
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user