fixed groups init loader not showing up

This commit is contained in:
namushka 2024-02-16 12:55:33 +03:00
parent f92072dad8
commit 23055d03c8
5 changed files with 20 additions and 4 deletions

View File

@ -77,7 +77,7 @@ const withLoader = (WrappedComponent) => (Loader) => {
showBodyLoader,
accountsViewAs,
};
}
},
)(observer(withLoader));
};
export default withLoader;

View File

@ -7,7 +7,6 @@ import useViewEffect from "SRC_DIR/Hooks/useViewEffect";
import { Base } from "@docspace/shared/themes";
import { TableContainer, TableBody } from "@docspace/shared/components/table";
import TableRow from "./TableRow";
import TableHeader from "./TableHeader";
import EmptyScreenGroups from "../../EmptyScreenGroups";

View File

@ -20,6 +20,8 @@ class GroupsStore {
infoPanelStore;
clientLoadingStore;
groups = [];
selection = [];
@ -36,10 +38,16 @@ class GroupsStore {
insideGroupBackUrl: string | null = null;
constructor(authStore: any, peopleStore: any, infoPanelStore: any) {
constructor(
authStore: any,
peopleStore: any,
infoPanelStore: any,
clientLoadingStore: any,
) {
this.authStore = authStore;
this.peopleStore = peopleStore;
this.infoPanelStore = infoPanelStore;
this.clientLoadingStore = clientLoadingStore;
makeAutoObservable(this);
}
@ -151,6 +159,7 @@ class GroupsStore {
updateFilter = false,
withFilterLocalStorage = false,
) => {
this.clientLoadingStore.setIsSectionBodyLoading(true);
const filterData = filter ? filter.clone() : Filter.getDefault();
const filterStorageItem = localStorage.getItem(
@ -169,6 +178,7 @@ class GroupsStore {
if (updateFilter) this.setFilterParams(filterData);
this.clientLoadingStore.setIsSectionBodyLoading(false);
this.groups = res.items || [];
};

View File

@ -63,6 +63,7 @@ class PeopleStore {
userStore,
tfaStore,
settingsStore,
clientLoadingStore,
) {
this.authStore = authStore;
this.infoPanelStore = infoPanelStore;
@ -72,7 +73,12 @@ class PeopleStore {
infoPanelStore,
userStore,
);
this.groupsStore = new GroupsStore(authStore, this, infoPanelStore);
this.groupsStore = new GroupsStore(
authStore,
this,
infoPanelStore,
clientLoadingStore,
);
this.targetUserStore = new TargetUserStore(this, userStore);
this.selectedGroupStore = new SelectedGroupStore(this);
this.editingFormStore = new EditingFormStore(this);

View File

@ -147,6 +147,7 @@ const peopleStore = new PeopleStore(
userStore,
tfaStore,
settingsStore,
clientLoadingStore,
);
const uploadDataStore = new UploadDataStore(