Skip to content
Snippets Groups Projects
Commit ea426778 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

Merge pull request #1183 from metabase/fix_dash_addcard_sort

fix bug where SortableItemList wasn't properly sorting by last modified time.
parents b97c6f3b 4c901740
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ export default class SortableItemList extends React.Component {
render() {
var items;
if (this.state.sort === "Last Modified") {
items = this.props.items.slice().sort((a, b) => a.updated_at < b.updated_at);
items = this.props.items.slice().sort((a, b) => b.updated_at - a.updated_at);
} else if (this.state.sort === "Alphabetical Order") {
items = this.props.items.slice().sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase()));
}
......
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