Added loading indicator on topology option change

This commit is contained in:
jpellizzari
2017-02-22 16:38:01 -08:00
parent 1b58c7725f
commit 5f468cc047

View File

@@ -174,7 +174,7 @@ export function rootReducer(state = initialState, action) {
if (topology) {
const topologyId = topology.get('parentId') || topology.get('id');
if (state.getIn(['topologyOptions', topologyId, action.option]) !== action.value) {
state = state.update('nodes', nodes => nodes.clear());
state = clearNodes(state);
}
state = state.setIn(
['topologyOptions', topologyId, action.option],
@@ -654,7 +654,7 @@ export function rootReducer(state = initialState, action) {
state = state.set('pinnedSearches', makeList(action.state.pinnedSearches));
state = state.set('searchQuery', action.state.searchQuery || '');
if (state.get('currentTopologyId') !== action.state.topologyId) {
state = state.update('nodes', nodes => nodes.clear());
state = clearNodes(state);
}
state = setTopology(state, action.state.topologyId);
state = setDefaultTopologyOptions(state, state.get('topologies'));