Skip to content

Commit

Permalink
Fix plotly#66
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarren1 committed Aug 13, 2018
1 parent 0dc6f33 commit 0ea7d96
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.13.3] - 2018-08-13
### Fixed
- Fix a bug in the ON_PROP_CHANGE callback where history was not correctly set when acting on more than one component. In particular, the 'undo' button should now work as expected. Fixes [#66](https://github.com/plotly/dash-renderer/issues/66).

## [0.13.2] - 2018-07-24
### Fixed
- Attempting to render a `Boolean` value to the page no longer crashes the app.
Expand Down
2 changes: 1 addition & 1 deletion dash_renderer/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.13.1'
__version__ = '0.13.2'
6 changes: 2 additions & 4 deletions src/reducers/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ function getInputHistoryState(itempath, props, state) {
function recordHistory(reducer) {
return function (state, action) {
// Record initial state
if (action.type === 'ON_PROP_CHANGE' &&
R.isEmpty(state.history.present)
) {
if (action.type === 'ON_PROP_CHANGE') {
const {itempath, props} = action.payload;
const historyEntry = getInputHistoryState(itempath, props, state);
if (historyEntry && !R.isEmpty(historyEntry.props)) {
Expand All @@ -75,7 +73,7 @@ function recordHistory(reducer) {
nextState.history = {
past: [
...nextState.history.past,
nextState.history.present
state.history.present
],
present: historyEntry,
future: []
Expand Down

0 comments on commit 0ea7d96

Please sign in to comment.