Skip to content

Commit

Permalink
Fix: Analysis only shows one asset/layer for a collection (#582)
Browse files Browse the repository at this point in the history
# Description
For multi-asset items, the Analysis page would only show one asset/layer
for a collection because the available datasets were being filtered by
unique stac collection id (`stacCol`).

This removes the filter, so all the assets show up.
  • Loading branch information
slesaad authored Jul 13, 2023
2 parents ffe8488 + c3daa70 commit b7ff7f8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions app/scripts/components/analysis/define/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import React, {
useRef
} from 'react';
import styled from 'styled-components';
import { uniqBy } from 'lodash';
import { media, multiply, themeVal } from '@devseed-ui/theme-provider';
import { Toolbar, ToolbarIconButton, ToolbarLabel } from '@devseed-ui/toolbar';
import { Dropdown, DropMenu, DropTitle } from '@devseed-ui/dropdown';
Expand Down Expand Up @@ -99,12 +98,10 @@ export const Note = styled.div`
}
`;

export const allAvailableDatasetsLayers: DatasetLayer[] = uniqBy(
Object.values(datasets)
export const allAvailableDatasetsLayers: DatasetLayer[] = Object.values(datasets)
.map((dataset) => (dataset as VedaDatum<DatasetData>).data.layers)
.flat(),
'stacCol'
).filter(d => d.type !== 'vector');
.flat()
.filter(d => d.type !== 'vector');

export default function Analysis() {

Expand Down

0 comments on commit b7ff7f8

Please sign in to comment.