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;
|
if (!boardData?.publicId) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await utils.board.byId.fetch({
|
await utils.board.byId.refetch();
|
||||||
boardPublicId: boardData.publicId,
|
|
||||||
filters: {
|
|
||||||
members: [],
|
|
||||||
labels: [],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
if (data) setBoardData(data);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showPopup({
|
showPopup({
|
||||||
header: "Error fetching board",
|
header: "Error fetching board",
|
||||||
|
|||||||
@@ -18,13 +18,7 @@ export function DeleteListConfirmation({
|
|||||||
const refetchBoard = async () => {
|
const refetchBoard = async () => {
|
||||||
if (boardData?.publicId) {
|
if (boardData?.publicId) {
|
||||||
try {
|
try {
|
||||||
await utils.board.byId.refetch({
|
await utils.board.byId.refetch();
|
||||||
boardPublicId: boardData.publicId,
|
|
||||||
filters: {
|
|
||||||
members: [],
|
|
||||||
labels: [],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default function List({
|
|||||||
ref={provided.innerRef}
|
ref={provided.innerRef}
|
||||||
{...provided.draggableProps}
|
{...provided.draggableProps}
|
||||||
{...provided.dragHandleProps}
|
{...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">
|
<div className="flex justify-between">
|
||||||
<form
|
<form
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ export default function BoardPage() {
|
|||||||
<div
|
<div
|
||||||
ref={provided.innerRef}
|
ref={provided.innerRef}
|
||||||
{...provided.droppableProps}
|
{...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) => (
|
{list.cards?.map((card, index) => (
|
||||||
<Draggable
|
<Draggable
|
||||||
|
|||||||
Reference in New Issue
Block a user