Skip to content

Commit

Permalink
Open In Query View disabled for well/wellbore in the sidebaršŸ› #2349 (#ā€¦
Browse files Browse the repository at this point in the history
ā€¦2426)

Co-authored-by: Elias Bruvik <elias.kristoffer.bruvik@gmail.com>
  • Loading branch information
robertbasti and eliasbruvik authored May 21, 2024
1 parent 13fb0e7 commit 759a7be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ const WellContextMenu = (props: WellContextMenuProps): React.ReactElement => {
wellUid: well.uid
})
}
disabled={checkedWellRows?.length !== 1}
disabled={!!checkedWellRows && checkedWellRows?.length !== 1}
>
<StyledIcon
name="textField"
Expand Down Expand Up @@ -317,6 +317,7 @@ const WellContextMenu = (props: WellContextMenuProps): React.ReactElement => {
wellboreUid: uuid()
})
}
disabled={!!checkedWellRows && checkedWellRows?.length !== 1}
>
<StyledIcon
name="add"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ const WellboreContextMenu = (
wellboreUid: wellbore.uid
})
}
disabled={checkedWellboreRows?.length !== 1}
disabled={
!!checkedWellboreRows && checkedWellboreRows.length !== 1
}
>
<StyledIcon
name="textField"
Expand Down Expand Up @@ -326,6 +328,9 @@ const WellboreContextMenu = (
key={"newObjects"}
label={"New object"}
icon={"add"}
disabled={
!!checkedWellboreRows && checkedWellboreRows.length !== 1
}
>
{Object.values(ObjectType)
.filter((objectType) => capObjects.includes(objectType))
Expand All @@ -341,6 +346,9 @@ const WellboreContextMenu = (
objectUid: uuid()
})
}
disabled={
!!checkedWellboreRows && checkedWellboreRows.length !== 1
}
>
<StyledIcon
name="add"
Expand Down

0 comments on commit 759a7be

Please sign in to comment.