Web: Client: Fixed FilesFilter
This commit is contained in:
parent
0459e319e4
commit
3958e9f156
@ -47,7 +47,7 @@ const useFiles = ({
|
||||
const fetchDefaultFiles = () => {
|
||||
const filter = FilesFilter.getDefault();
|
||||
|
||||
const url = getCategoryUrl(CategoryType.personal);
|
||||
const url = getCategoryUrl(CategoryType.Personal);
|
||||
|
||||
navigate(`${url}?${filter.toUrlParams()}`);
|
||||
};
|
||||
|
@ -104,7 +104,7 @@ const getSearchParams = (filterValues) => {
|
||||
"key"
|
||||
);
|
||||
|
||||
return searchParams || "true";
|
||||
return searchParams || FilterKeys.excludeSubfolders;
|
||||
};
|
||||
|
||||
const getType = (filterValues) => {
|
||||
@ -366,7 +366,8 @@ const SectionFilterContent = ({
|
||||
}
|
||||
|
||||
newFilter.withSubfolders =
|
||||
withSubfolders === FilterKeys.excludeSubfolders ? "false" : "true";
|
||||
withSubfolders === FilterKeys.excludeSubfolders ? null : "true";
|
||||
console.log(data);
|
||||
newFilter.searchInContent = withContent === "true" ? "true" : null;
|
||||
|
||||
const path = location.pathname.split("/filter")[0];
|
||||
@ -783,10 +784,10 @@ const SectionFilterContent = ({
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (filter.withSubfolders === "false") {
|
||||
if (filter.withSubfolders === "true") {
|
||||
filterValues.push({
|
||||
key: FilterKeys.excludeSubfolders,
|
||||
label: t("ExcludeSubfolders"),
|
||||
key: FilterKeys.withSubfolders,
|
||||
label: t("WithSubfolders"),
|
||||
group: FilterGroups.filterFolders,
|
||||
});
|
||||
}
|
||||
@ -1417,16 +1418,16 @@ const SectionFilterContent = ({
|
||||
label: "",
|
||||
withOptions: true,
|
||||
options: [
|
||||
{
|
||||
id: "filter_folders_with-subfolders",
|
||||
key: FilterKeys.withSubfolders,
|
||||
label: t("WithSubfolders"),
|
||||
},
|
||||
{
|
||||
id: "filter_folders_exclude-subfolders",
|
||||
key: FilterKeys.excludeSubfolders,
|
||||
label: t("ExcludeSubfolders"),
|
||||
},
|
||||
{
|
||||
id: "filter_folders_with-subfolders",
|
||||
key: FilterKeys.withSubfolders,
|
||||
label: t("WithSubfolders"),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@ -1933,7 +1934,7 @@ const SectionFilterContent = ({
|
||||
newFilter.excludeSubject = null;
|
||||
}
|
||||
if (group === FilterGroups.filterFolders) {
|
||||
newFilter.withSubfolders = "true";
|
||||
newFilter.withSubfolders = null;
|
||||
}
|
||||
if (group === FilterGroups.filterContent) {
|
||||
newFilter.searchInContent = null;
|
||||
|
@ -3637,7 +3637,7 @@ class FilesStore {
|
||||
: authorType ||
|
||||
roomId ||
|
||||
search ||
|
||||
!withSubfolders ||
|
||||
withSubfolders ||
|
||||
filterType ||
|
||||
searchInContent;
|
||||
|
||||
|
@ -9,7 +9,7 @@ const DEFAULT_SORT_BY = "DateAndTime";
|
||||
const DEFAULT_SORT_ORDER = "descending";
|
||||
const DEFAULT_VIEW = "row";
|
||||
const DEFAULT_FILTER_TYPE = null;
|
||||
const DEFAULT_SEARCH_TYPE = true; //withSubfolders
|
||||
const DEFAULT_SEARCH_TYPE = null; //withSubfolders
|
||||
const DEFAULT_SEARCH = null;
|
||||
const DEFAULT_AUTHOR_TYPE = null;
|
||||
const DEFAULT_ROOM_ID = null;
|
||||
|
Loading…
Reference in New Issue
Block a user