Project

General

Profile

« Previous | Next » 

Revision 1fbe855f

Added by vagrant almost 6 years ago

Fixes #23906 - Fix react re-render after tasks polling

View differences:

webpack/scenes/Subscriptions/SubscriptionReducer.js
}
case TASK_BULK_SEARCH_SUCCESS: {
let tasks = [];
let tasks;
const search = find(action.response, bulkSearch =>
bulkSearch.search_params.search_id === MANIFEST_TASKS_BULK_SEARCH_ID);
if (search) {
if (search && search.results.length > 0) {
tasks = search.results;
}
return state.set('tasks', tasks);
}
webpack/scenes/Subscriptions/index.js
import SubscriptionsPage from './SubscriptionsPage';
import './Subscriptions.scss';
const EMPTY_ARRAY = []
// map state to props
const mapStateToProps = state => ({
subscriptions: state.katello.subscriptions,
tasks: state.katello.subscriptions.tasks,
tasks: state.katello.subscriptions.tasks || EMPTY_ARRAY,
});
// map action dispatchers to props

Also available in: Unified diff