Location sort based on Country first and city
This commit is contained in:
parent
57a63fa711
commit
ba65b67aaa
2 changed files with 4 additions and 2 deletions
|
@ -81,6 +81,8 @@ class EnhancedTable extends Component {
|
|||
};
|
||||
}).sort(sortBy('name'))
|
||||
};
|
||||
|
||||
this.handleRequestSort('', this.props.orderBy);
|
||||
}
|
||||
|
||||
handleRequestSort = (event, property) => {
|
||||
|
|
|
@ -244,7 +244,7 @@ class AmbassadorsPage extends Component {
|
|||
addLocationSearchText(cities){
|
||||
let searchText = '';
|
||||
cities.forEach((location) => {
|
||||
searchText += `${(location.name).replace(/(^|\s)\S/g, l => l.toUpperCase())} - ${countries.getName(location.country)} `;
|
||||
searchText += `${countries.getName(location.country)} - ${(location.name).replace(/(^|\s)\S/g, l => l.toUpperCase())}`;
|
||||
});
|
||||
|
||||
return searchText;
|
||||
|
@ -394,7 +394,7 @@ class AmbassadorsPage extends Component {
|
|||
<EnhancedTable
|
||||
columnData={columnData}
|
||||
data={data}
|
||||
orderBy="location"
|
||||
orderBy="Location"
|
||||
showSearchColumns={false}
|
||||
rowsPerPage={10}
|
||||
isAdmin={false}
|
||||
|
|
Loading…
Reference in a new issue