Skip to content

Commit

Permalink
Fix variants not updating when switching scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonBein committed Aug 28, 2024
1 parent 592391c commit ed8351c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions frontend/cypress/e2e/application.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,5 +554,7 @@ describe('LCA Configuration Tests', () => {
cy.get('button.chakra-accordion__button').should('have.length', 1);
cy.get('button.chakra-accordion__button').findByText(newVariantName).should('exist');
});

// TODO regression test for: View doesn't update when changing scenarios
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function LcaVariantsConfiguration({ getData, toasting }) {

setVariants(lcaDm.getVariants(getData));
setIsScenarioModelLoaded(true);
}, []);
}, [getData]);

const handleSaveCostVariant = async (variant) => {
const isExistingVariant = variant.id && variants.some(v => v.id === variant.id);
Expand Down

0 comments on commit ed8351c

Please sign in to comment.