Github Reports - Fixed default sort order
Fixed default sort order to match sortby dropdown
This commit is contained in:
parent
276631880b
commit
409111209e
|
|
@ -139,7 +139,14 @@ class GithubRepos extends React.Component {
|
|||
}}>
|
||||
{
|
||||
this.sortOptions.map(option=>{
|
||||
return <option value={option.value} key={option.value}>{option.text}</option>;
|
||||
return (
|
||||
<option
|
||||
value={option.value}
|
||||
key={option.value}
|
||||
selected={option.value === this.props.sortedValue.value}
|
||||
>
|
||||
{option.text}
|
||||
</option>);
|
||||
})
|
||||
}
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
let githubReducer = (state={repoLanguages: {}, page: 1, sortedValue: {value:'updated_at', asc:false}}, action) => {
|
||||
let githubReducer = (state={repoLanguages: {}, page: 1, sortedValue: {value:'pushed_at', asc:false}}, action) => {
|
||||
switch(action.type) {
|
||||
case 'GET_REPOS':
|
||||
return { ...state, repos: action.payload };
|
||||
|
|
|
|||
Loading…
Reference in New Issue