fix: reenable switching lists from list dropdown
This commit is contained in:
@@ -23,7 +23,7 @@ export default function ListSelector({
|
|||||||
|
|
||||||
const { showPopup } = usePopup();
|
const { showPopup } = usePopup();
|
||||||
|
|
||||||
const updateCardList = api.card.reorder.useMutation({
|
const updateCardList = api.card.update.useMutation({
|
||||||
onMutate: async (newList) => {
|
onMutate: async (newList) => {
|
||||||
await utils.card.byId.cancel();
|
await utils.card.byId.cancel();
|
||||||
|
|
||||||
@@ -36,9 +36,9 @@ export default function ListSelector({
|
|||||||
...oldCard,
|
...oldCard,
|
||||||
list: {
|
list: {
|
||||||
...oldCard.list,
|
...oldCard.list,
|
||||||
publicId: newList.newListPublicId,
|
publicId: newList.listPublicId ?? "",
|
||||||
name: oldCard.list?.name ?? "",
|
name: oldCard.list.name ?? "",
|
||||||
board: oldCard.list?.board ?? null,
|
board: oldCard.list.board ?? null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -72,7 +72,8 @@ export default function ListSelector({
|
|||||||
handleSelect={(_, member) => {
|
handleSelect={(_, member) => {
|
||||||
updateCardList.mutate({
|
updateCardList.mutate({
|
||||||
cardPublicId,
|
cardPublicId,
|
||||||
newListPublicId: member.key,
|
listPublicId: member.key,
|
||||||
|
index: 0,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
asChild
|
asChild
|
||||||
|
|||||||
Reference in New Issue
Block a user