Skip to content

Commit

Permalink
fix: Model area select bug. Delete case bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
mheggelund committed Feb 6, 2024
1 parent 41e8fd8 commit 368b928
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/features/Compute/CaseGroup/CaseGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export const CaseGroup = ({
{caseList.concat(localList).map((c, index) => (
<CaseRow
rowCase={c}
key={index}
key={c.computeCaseId}
id={c.computeCaseId}
allCasesList={caseList.concat(localList)}
caseList={caseList}
Expand All @@ -394,7 +394,7 @@ export const CaseGroup = ({
{caseList.concat(filerLocalList(methodName)).map((c, index) => (
<CaseRow
rowCase={c}
key={index}
key={c.computeCaseId}
id={c.computeCaseId}
allCasesList={caseList.concat(localList)}
caseList={caseList}
Expand Down
7 changes: 5 additions & 2 deletions src/features/Compute/CaseGroup/CaseRow/CaseRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ export const CaseRow = ({

if (
row[0] !== undefined &&
row[0].modelArea !== null &&
selectedModelArea &&
selectedModelArea[0].modelAreaId !== ''
) {
Expand Down Expand Up @@ -362,7 +361,11 @@ export const CaseRow = ({
// and if the existing case model area has an empty string as id. Returns the selected area.
// 4. Returns the set area. If all 3 above checks is fails the default empty area is returned.

if (rowCase.length > 0 && rowCase[0].modelArea === null) {
if (
rowCase.length > 0 &&
rowCase[0].modelArea === null &&
selectedModelArea === undefined
) {
defaultArea = [
{
modelAreaId: '',
Expand Down

0 comments on commit 368b928

Please sign in to comment.