Await fetchAllFiles() in FilesPage onMounted to fix premature loading reset

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 18:40:27 +08:00
parent 07dd30dc50
commit 7a1b996877

View File

@@ -930,9 +930,9 @@ const handleWindowClick = (e) => {
}; };
// Mounted // Mounted
onMounted(() => { onMounted(async () => {
isLoading.value = true; isLoading.value = true;
store.fetchAllFiles(); await store.fetchAllFiles();
window.addEventListener("click", handleWindowClick); window.addEventListener("click", handleWindowClick);
// Add the .scrollbar class to the DataTable tbody // Add the .scrollbar class to the DataTable tbody
const tbodyElement = document.querySelector(".p-datatable-tbody"); const tbodyElement = document.querySelector(".p-datatable-tbody");