Skip to content

Commit

Permalink
feat(dataTable): fix layer state when features are null after fetchin…
Browse files Browse the repository at this point in the history
…g #closes1823
  • Loading branch information
kaminderpal committed Feb 22, 2024
1 parent d28bd37 commit effc4e0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface LayerListEntry {
mapFilteredIcon?: ReactNode;
tooltip?: ReactNode;
numOffeatures?: number;
features: TypeArrayOfFeatureInfoEntries;
features?: TypeArrayOfFeatureInfoEntries;
}

interface LayerListProps {
Expand Down Expand Up @@ -136,7 +136,7 @@ const LayerListItem = memo(function LayerListItem({ isSelected, layer, onListIte
<ListItemButton
selected={isSelected}
// disable when layer features has null value.
disabled={layer?.numOffeatures === 0 || layer.features === null}
disabled={layer?.numOffeatures === 0 || layer?.features === null}
onClick={() => onListItemClick(layer)}
>
{renderLayerIcon()}
Expand Down

0 comments on commit effc4e0

Please sign in to comment.