Skip to content

Commit 5691e1e

Browse files
committed
Fixed Category filter.
1 parent edcf8b1 commit 5691e1e

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

client/packages/lowcoder/src/pages/ApplicationV2/HomeLayout.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ export function HomeLayout(props: HomeLayoutProps) {
340340
modify
341341

342342
} = props;
343+
344+
343345
const handlePageChange = (page: number) => {
344346
setCurrentPage(page);
345347
};
@@ -431,15 +433,6 @@ export function HomeLayout(props: HomeLayoutProps) {
431433
}
432434
return true;
433435
})
434-
.filter((e) => {
435-
// If "All" is selected, do not filter out any elements based on category
436-
if (categoryFilter === 'All' || !categoryFilter) {
437-
return true;
438-
}
439-
// Otherwise, filter elements based on the selected category
440-
return !e.folder && e.category === categoryFilter.toString();
441-
})
442-
443436
.map((e) =>
444437
e.folder
445438
? {
@@ -471,7 +464,6 @@ export function HomeLayout(props: HomeLayoutProps) {
471464
}
472465
);
473466

474-
475467
const getFilterMenuItem = (type: HomeResTypeEnum) => {
476468
const Icon = HomeResInfo[type].icon;
477469
return {

0 commit comments

Comments
 (0)