@@ -21,9 +21,7 @@ const sortByOptions = [
21
21
{ label : 'Latest Updated Descending' , selected : false } ,
22
22
] ;
23
23
// Locations
24
- const locations = [ {
25
- label : 'Anywhere' , selected : true ,
26
- } ] ;
24
+ let locations = [ ] ;
27
25
28
26
class RecruitCRMJobsContainer extends React . Component {
29
27
constructor ( props ) {
@@ -33,7 +31,7 @@ class RecruitCRMJobsContainer extends React.Component {
33
31
term : '' ,
34
32
page : 0 ,
35
33
sortBy : 'created_on' ,
36
- location : 'Anywhere ' ,
34
+ location : 'Any Location ' ,
37
35
} ;
38
36
// binds
39
37
this . onSearch = this . onSearch . bind ( this ) ;
@@ -127,6 +125,8 @@ class RecruitCRMJobsContainer extends React.Component {
127
125
if ( location === 'Anywhere' || location === 'Any' || location === 'Any Location' ) return true ;
128
126
return location . toLowerCase ( ) === job . country . toLowerCase ( ) ;
129
127
} ) ;
128
+ // sort location dropdown
129
+ locations = _ . sortBy ( locations , [ 'label' ] ) ;
130
130
// Filter by term
131
131
if ( term ) {
132
132
jobsToDisplay = _ . filter ( jobsToDisplay , ( job ) => {
@@ -178,11 +178,12 @@ class RecruitCRMJobsContainer extends React.Component {
178
178
179
179
RecruitCRMJobsContainer . defaultProps = {
180
180
jobs : [ ] ,
181
+ loading : true ,
181
182
} ;
182
183
183
184
RecruitCRMJobsContainer . propTypes = {
184
185
getJobs : PT . func . isRequired ,
185
- loading : PT . bool . isRequired ,
186
+ loading : PT . bool ,
186
187
jobs : PT . arrayOf ( PT . shape ) ,
187
188
} ;
188
189
0 commit comments