Skip to content

Commit

Permalink
Do not render AssetList when selectableFeatures is empty array\ (#2834)
Browse files Browse the repository at this point in the history
  • Loading branch information
vdegraaf authored Mar 25, 2024
1 parent 90166ee commit 435303e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ describe('DetailPanel', () => {
withAssetSelectContext(<DetailPanel {...props} />, {
...currentContextValue,
selection: undefined,
selectableFeatures: [],
})
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ const DetailPanel: FC<DetailPanelProps> = ({ language, zoomLevel }) => {
/>
</>
)}
{((selection && selectionOnMap) || selectableFeatures) && (
{((selection && selectionOnMap) ||
(selectableFeatures && selectableFeatures.length > 0)) && (
<StyledAssetList
selection={selection}
remove={removeItem}
Expand Down

0 comments on commit 435303e

Please sign in to comment.