Skip to content

Commit

Permalink
Merge pull request #47 from DylanHojnoski/bucket-delete-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb committed Apr 14, 2024
2 parents 9c5b836 + 51a5686 commit 60fa856
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/basket/basket-select-and-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ const BasketsSelectAndEdit = observer((props: BasketsSelectAndEditProps) => {
}

allBasketsState.removeBasket(currentBasket.id);
const termBaskets = allBasketsState.getBasketsFor(currentBasket.forTerm);
if (termBaskets.length > 0) {
allBasketsState.setSelectedBasket(termBaskets[0].id);
}

deleteBasketDisclosure.onClose();
}, [allBasketsState, currentBasket, deleteBasketDisclosure]);

Expand Down

0 comments on commit 60fa856

Please sign in to comment.