diff --git a/src/components/Kanban/Board.tsx b/src/components/Kanban/Board.tsx index 337f98f1caf..d172d21ed92 100644 --- a/src/components/Kanban/Board.tsx +++ b/src/components/Kanban/Board.tsx @@ -9,6 +9,8 @@ import { useTranslation } from "react-i18next"; import CareIcon from "@/CAREUI/icons/CareIcon"; +import { ScrollArea } from "@/components/ui/scroll-area"; + import request from "@/Utils/request/request"; import { QueryRoute } from "@/Utils/request/types"; import { QueryOptions } from "@/Utils/request/useQuery"; @@ -57,7 +59,7 @@ export default function KanbanBoard( -
+
{props.sections.map((section, i) => ( @@ -92,8 +94,6 @@ export function KanbanSection( const defaultLimit = 14; const { t } = useTranslation(); - // should be replaced with useInfiniteQuery when we move over to react query - const fetchNextPage = async (refresh: boolean = false) => { if (!refresh && (fetchingNextPage || !hasMore)) return; if (refresh) setPages([]); @@ -121,7 +121,6 @@ export function KanbanSection( const sectionElementHeight = sectionRef.current?.getBoundingClientRect().height; const scrolled = props.boardRef.current?.scrollTop; - // if user has scrolled 3/4th of the current items if ( scrolled && sectionElementHeight && @@ -145,9 +144,7 @@ export function KanbanSection( {(provided) => (
@@ -159,7 +156,7 @@ export function KanbanSection(
-
+ {!fetchingNextPage && totalCount === 0 && (
{t("no_results_found")} @@ -184,7 +181,7 @@ export function KanbanSection( {fetchingNextPage && (
)} -
+
)}