forked from github/plane
fix: module filter and order by (#4040)
This commit is contained in:
parent
72392d5731
commit
cdf86391f0
@ -38,7 +38,7 @@ export const ModulesListView: React.FC = observer(() => {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (totalFilters > 0 || searchQuery.trim() !== "")
|
if (totalFilters > 0 && filteredModuleIds.length === 0)
|
||||||
return (
|
return (
|
||||||
<div className="h-full w-full grid place-items-center">
|
<div className="h-full w-full grid place-items-center">
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
|
@ -22,7 +22,7 @@ export const orderModules = (modules: IModule[], orderByKey: TModuleOrderByOptio
|
|||||||
(m) => {
|
(m) => {
|
||||||
let progress = (m.completed_issues + m.cancelled_issues) / m.total_issues;
|
let progress = (m.completed_issues + m.cancelled_issues) / m.total_issues;
|
||||||
if (isNaN(progress)) progress = 0;
|
if (isNaN(progress)) progress = 0;
|
||||||
return orderByKey === "progress" ? progress : !progress;
|
return orderByKey === "progress" ? progress : -progress;
|
||||||
},
|
},
|
||||||
"name",
|
"name",
|
||||||
]);
|
]);
|
||||||
|
Loading…
Reference in New Issue
Block a user