Skip to content

Commit 657ab92

Browse files
authored
Merge pull request #110 from plotly/fix-reload
Fix reload
2 parents 7812cba + d1e43d2 commit 657ab92

File tree

7 files changed

+3203
-3147
lines changed

7 files changed

+3203
-3147
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [UNRELEASED] - 2018-12-17
6-
### Removed
5+
## [UNRELEASED]
6+
### Fixed - 2018-12-19
7+
[#110](https://github.com/plotly/dash-renderer/pull/110)
8+
9+
- Keep the config store state on soft reload.
10+
- AppProvider returns `Loading...` if no configs as before #108
11+
12+
### Removed - 2018-12-17
713
- Unused login api and Authentication component [#108](https://github.com/plotly/dash-renderer/pull/108)
814

915
## [0.16.1] - 2018-12-14

dash_renderer/dash_renderer.dev.js

Lines changed: 3173 additions & 3137 deletions
Large diffs are not rendered by default.

dash_renderer/dash_renderer.dev.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_renderer/dash_renderer.min.js

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_renderer/dash_renderer.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/AppContainer.react.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import Loading from './components/core/Loading.react';
77
import Toolbar from './components/core/Toolbar.react';
88
import Reloader from './components/core/Reloader.react';
99
import {readConfig} from './actions';
10+
import {type} from 'ramda';
11+
1012

1113
class UnconnectedAppContainer extends React.Component {
1214

@@ -16,6 +18,10 @@ class UnconnectedAppContainer extends React.Component {
1618
}
1719

1820
render() {
21+
const {config} = this.props;
22+
if (type(config) === 'Null') {
23+
return <div className="_dash-loading">Loading...</div>;
24+
}
1925
return (
2026
<div>
2127
<Toolbar />
@@ -30,11 +36,13 @@ class UnconnectedAppContainer extends React.Component {
3036

3137
UnconnectedAppContainer.propTypes = {
3238
dispatch: PropTypes.func,
39+
config: PropTypes.object,
3340
};
3441

3542
const AppContainer = connect(
3643
state => ({
3744
history: state.history,
45+
config: state.config,
3846
}),
3947
dispatch => ({dispatch})
4048
)(UnconnectedAppContainer);

src/reducers/reducer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ function recordHistory(reducer) {
9494
function reloaderReducer(reducer) {
9595
return function(state, action) {
9696
if (action.type === 'RELOAD') {
97-
const {history} = state;
97+
const {history, config} = state;
9898
// eslint-disable-next-line no-param-reassign
99-
state = {history};
99+
state = {history, config};
100100
}
101101
return reducer(state, action);
102102
};

0 commit comments

Comments
 (0)