Skip to content
Snippets Groups Projects
Commit f4d13840 authored by Chris Lawton's avatar Chris Lawton
Browse files

sort grouped items by last updated in the detail view

parent e14f5894
No related branches found
No related tags found
No related merge requests found
...@@ -89,6 +89,10 @@ export default class GroupedListing extends React.Component { ...@@ -89,6 +89,10 @@ export default class GroupedListing extends React.Component {
items: values.reduce((acc, value) => acc.concat(groupedItems[value] || []), []) items: values.reduce((acc, value) => acc.concat(groupedItems[value] || []), [])
})).filter(({items}) => items.length !== 0) })).filter(({items}) => items.length !== 0)
orderedItems.map(value => {
value.items.sort((a,b) => a.lastUpdate > b.lastUpdate ? -1 : 1)
})
this.setState({orderedItems}); this.setState({orderedItems});
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment