diff options
| author | Thomas Haddad | 2017-04-18 15:39:04 +0200 |
|---|---|---|
| committer | Thomas Haddad | 2017-04-18 15:39:04 +0200 |
| commit | c41b4723c0b7b0a1c93d5980cefafad0976445f0 (patch) | |
| tree | 4d1fbcbace278735631a25ef93794512ff5fa352 /app/assets/javascripts | |
| parent | c4597f1c720eb45863415d63b1ac3417fb11503e (diff) | |
| download | chouette-core-c41b4723c0b7b0a1c93d5980cefafad0976445f0.tar.bz2 | |
Refs #2896: Fix current_month not being updated after page changing for synthesis
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Diffstat (limited to 'app/assets/javascripts')
| -rw-r--r-- | app/assets/javascripts/es6_browserified/time_tables/reducers/timetable.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/es6_browserified/time_tables/reducers/timetable.js b/app/assets/javascripts/es6_browserified/time_tables/reducers/timetable.js index ba770df26..23c943d13 100644 --- a/app/assets/javascripts/es6_browserified/time_tables/reducers/timetable.js +++ b/app/assets/javascripts/es6_browserified/time_tables/reducers/timetable.js @@ -12,9 +12,10 @@ const timetable = (state = {}, action) => { }) return _.assign({}, fetchedState, {current_month: actions.updateSynthesis(fetchedState)}) case 'RECEIVE_MONTH': - return _.assign({}, state, { + let newState = _.assign({}, state, { current_month: action.json.days }) + return _.assign({}, newState, {current_month: actions.updateSynthesis(newState)}) case 'GO_TO_PREVIOUS_PAGE': case 'GO_TO_NEXT_PAGE': let nextPage = action.nextPage ? 1 : -1 |
