Add search results pagination to web UI (#11409)
* Add search results pagination to web UI Fix #10737 * Fix code style issue
This commit is contained in:
parent
b9fbcbfe4e
commit
8a4674f2c3
5 changed files with 76 additions and 8 deletions
|
@ -3,6 +3,7 @@ import {
|
|||
SEARCH_CLEAR,
|
||||
SEARCH_FETCH_SUCCESS,
|
||||
SEARCH_SHOW,
|
||||
SEARCH_EXPAND_SUCCESS,
|
||||
} from '../actions/search';
|
||||
import {
|
||||
COMPOSE_MENTION,
|
||||
|
@ -42,6 +43,8 @@ export default function search(state = initialState, action) {
|
|||
statuses: ImmutableList(action.results.statuses.map(item => item.id)),
|
||||
hashtags: fromJS(action.results.hashtags),
|
||||
})).set('submitted', true).set('searchTerm', action.searchTerm);
|
||||
case SEARCH_EXPAND_SUCCESS:
|
||||
return state.updateIn(['results', action.searchType], list => list.concat(action.results[action.searchType].map(item => item.id)));
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue