Skip to content

Commit

Permalink
Make layer order depend on definitions in the mdx file (#1065)
Browse files Browse the repository at this point in the history
**Related Ticket:** _{link related ticket here}_

### Description of Changes
We recently made a change to further order the layers within the
datasets in the E&A Modal in alphabetical way. However, the behavior
there should be such that:

1. The datasets should be ordered alphabetically
2. The layers within the datasets should depend on their order in the
mdx file

### Notes & Questions About Changes
_{Add additonal notes and outstanding questions here related to changes
in this pull request}_

### Validation / Testing
1. Check that the datasets in the E&A Modal are ordered alphabetically
2. Check that the layers within those datasets in the E&A Modal are
ordered as per their order in the mdx file
3. (Optional) Check Data Catalog and that it's ordering is in
alphabetical way
  • Loading branch information
dzole0311 authored Jul 23, 2024
2 parents 8315911 + 56c8063 commit 3ae1ed3
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions app/scripts/components/common/catalog/prepare-datasets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@ export function prepareDatasets (
return a[sortField]?.localeCompare(b[sortField]);
});

if (filterLayers && sortField) {
filtered = filtered.map((d) => ({
...d,
layers:
isDatasetData(d) &&
d.layers.sort((a, b) => a[sortField]?.localeCompare(b[sortField]) || 0)
})) as DatasetData[];
}

if (sortDir === 'desc') {
/* eslint-disable-next-line fp/no-mutating-methods */
filtered.reverse();
Expand Down

0 comments on commit 3ae1ed3

Please sign in to comment.