Skip to content
Snippets Groups Projects
Unverified Commit cb2e198d authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix not showing loading indicator when searching in web UI (#17655)

parent 0883f057
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,7 @@ class Results extends React.PureComponent {
</div>
<div className='explore__search-results'>
{isLoading ? (<LoadingIndicator />) : filteredResults}
{isLoading ? <LoadingIndicator /> : filteredResults}
</div>
</React.Fragment>
);
......
......@@ -41,7 +41,10 @@ export default function search(state = initialState, action) {
case COMPOSE_DIRECT:
return state.set('hidden', true);
case SEARCH_FETCH_REQUEST:
return state.set('isLoading', true);
return state.withMutations(map => {
map.set('isLoading', true);
map.set('submitted', true);
});
case SEARCH_FETCH_FAIL:
return state.set('isLoading', false);
case SEARCH_FETCH_SUCCESS:
......@@ -52,7 +55,6 @@ export default function search(state = initialState, action) {
hashtags: fromJS(action.results.hashtags),
}));
map.set('submitted', true);
map.set('searchTerm', action.searchTerm);
map.set('isLoading', false);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment