fix: persist filters when refetching boards
This commit is contained in:
@@ -54,14 +54,7 @@ export const BoardProvider: React.FC<{ children: ReactNode }> = ({
|
||||
if (!boardData?.publicId) return;
|
||||
|
||||
try {
|
||||
const data = await utils.board.byId.fetch({
|
||||
boardPublicId: boardData.publicId,
|
||||
filters: {
|
||||
members: [],
|
||||
labels: [],
|
||||
},
|
||||
});
|
||||
if (data) setBoardData(data);
|
||||
await utils.board.byId.refetch();
|
||||
} catch (e) {
|
||||
showPopup({
|
||||
header: "Error fetching board",
|
||||
|
||||
@@ -18,13 +18,7 @@ export function DeleteListConfirmation({
|
||||
const refetchBoard = async () => {
|
||||
if (boardData?.publicId) {
|
||||
try {
|
||||
await utils.board.byId.refetch({
|
||||
boardPublicId: boardData.publicId,
|
||||
filters: {
|
||||
members: [],
|
||||
labels: [],
|
||||
},
|
||||
});
|
||||
await utils.board.byId.refetch();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ export default function List({
|
||||
ref={provided.innerRef}
|
||||
{...provided.draggableProps}
|
||||
{...provided.dragHandleProps}
|
||||
className="dark-text-dark-1000 z-0 mr-5 h-fit min-w-[18rem] max-w-[18rem] rounded-md border border-light-400 bg-light-300 py-2 pl-2 pr-1 text-neutral-900 dark:border-dark-300 dark:bg-dark-100"
|
||||
className="dark-text-dark-1000 mr-5 h-fit min-w-[18rem] max-w-[18rem] rounded-md border border-light-400 bg-light-300 py-2 pl-2 pr-1 text-neutral-900 dark:border-dark-300 dark:bg-dark-100"
|
||||
>
|
||||
<div className="flex justify-between">
|
||||
<form
|
||||
|
||||
@@ -218,7 +218,7 @@ export default function BoardPage() {
|
||||
<div
|
||||
ref={provided.innerRef}
|
||||
{...provided.droppableProps}
|
||||
className="h-full max-h-[calc(100vh-250px)] min-h-[2rem] overflow-y-auto pr-1 scrollbar scrollbar-track-dark-100 scrollbar-thumb-dark-600 scrollbar-track-rounded-[4px] scrollbar-thumb-rounded-[4px] scrollbar-w-[8px]"
|
||||
className="z-10 h-full max-h-[calc(100vh-250px)] min-h-[2rem] overflow-y-auto pr-1 scrollbar scrollbar-track-dark-100 scrollbar-thumb-dark-600 scrollbar-track-rounded-[4px] scrollbar-thumb-rounded-[4px] scrollbar-w-[8px]"
|
||||
>
|
||||
{list.cards?.map((card, index) => (
|
||||
<Draggable
|
||||
|
||||
Reference in New Issue
Block a user