Added order control to countries graph

This commit is contained in:
Alejandro Celaya
2018-10-28 22:54:08 +01:00
parent 6634fc41c5
commit 368de2b4c7
8 changed files with 119 additions and 34 deletions

View File

@@ -43,10 +43,7 @@ export class ShortUrlsListComponent extends React.Component {
});
};
handleOrderBy = (orderField, orderDir) => {
this.setState({
orderDir,
orderField: orderDir !== undefined ? orderField : undefined,
});
this.setState({ orderField, orderDir });
this.refreshList({ orderBy: { [orderField]: orderDir } });
};
orderByColumn = (columnName) => () =>