Skip to content

Commit

Permalink
Merge pull request #67 from rmarren1/undo-error
Browse files Browse the repository at this point in the history
Fix undo button bug
  • Loading branch information
rmarren1 authored Nov 19, 2018
2 parents a38da62 + ba0f577 commit 5e4d562
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 4 additions & 1 deletion 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.15.1] - 2018-11-17
### 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.15.0] - 2018-11-14
### Added
- Hot reload [#73](https://github.com/plotly/dash-renderer/pull/73)
Expand All @@ -18,7 +22,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Prettier support
- Better ESLint configs


## [0.14.1] - 2018-09-20
### Fixed
- Renamed `__init__.py` external_path to dash_renderer.min.js
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.15.0'
__version__ = '0.15.1'
8 changes: 3 additions & 5 deletions src/reducers/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,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 Down Expand Up @@ -82,7 +79,8 @@ function recordHistory(reducer) {
nextState.history = {
past: [
...nextState.history.past,
nextState.history.present,
state.history.present

],
present: historyEntry,
future: [],
Expand Down

0 comments on commit 5e4d562

Please sign in to comment.