Skip to content

Commit

Permalink
resoruce board filter (ohcnetwork#9558)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihal467 authored Dec 24, 2024
1 parent 3b8f7a4 commit 6994b36
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/Kanban/Board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ export function KanbanSection<T extends { id: string }>(
const sectionRef = useRef<HTMLDivElement>(null);
const defaultLimit = 14;
const { t } = useTranslation();

const options = section.fetchOptions(section.id);
const fetchPage = async ({ pageParam = 0 }) => {
const options = section.fetchOptions(section.id);
try {
const data = await callApi(options.route, {
...options.options,
Expand All @@ -118,7 +117,7 @@ export function KanbanSection<T extends { id: string }>(
isLoading,
refetch,
} = useInfiniteQuery({
queryKey: [section.id],
queryKey: ["board", section.id, options.options?.query],
queryFn: fetchPage,
getNextPageParam: (lastPage, pages) => {
if (!lastPage.next) return undefined;
Expand Down

0 comments on commit 6994b36

Please sign in to comment.