Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Fix reload #110

Merged
merged 5 commits into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [UNRELEASED] - 2018-12-17
### Removed
## [UNRELEASED]
### Fixed - 2018-12-19
[#110](https://github.com/plotly/dash-renderer/pull/110)

- Keep the config store state on soft reload.
- AppProvider returns `Loading...` if no configs as before #108

alexcjohnson marked this conversation as resolved.
Show resolved Hide resolved
### Removed - 2018-12-17
- Unused login api and Authentication component [#108](https://github.com/plotly/dash-renderer/pull/108)

## [0.16.1] - 2018-12-14
Expand Down
6,310 changes: 3,173 additions & 3,137 deletions dash_renderer/dash_renderer.dev.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_renderer/dash_renderer.dev.js.map

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions dash_renderer/dash_renderer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_renderer/dash_renderer.min.js.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/AppContainer.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Loading from './components/core/Loading.react';
import Toolbar from './components/core/Toolbar.react';
import Reloader from './components/core/Reloader.react';
import {readConfig} from './actions';
import {type} from 'ramda';


class UnconnectedAppContainer extends React.Component {

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

render() {
const {config} = this.props;
if (type(config) === 'Null') {
return <div className="_dash-loading">Loading...</div>;
}
return (
<div>
<Toolbar />
Expand All @@ -30,11 +36,13 @@ class UnconnectedAppContainer extends React.Component {

UnconnectedAppContainer.propTypes = {
dispatch: PropTypes.func,
config: PropTypes.object,
};

const AppContainer = connect(
state => ({
history: state.history,
config: state.config,
}),
dispatch => ({dispatch})
)(UnconnectedAppContainer);
Expand Down
4 changes: 2 additions & 2 deletions src/reducers/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ function recordHistory(reducer) {
function reloaderReducer(reducer) {
return function(state, action) {
if (action.type === 'RELOAD') {
const {history} = state;
const {history, config} = state;
// eslint-disable-next-line no-param-reassign
state = {history};
state = {history, config};
}
return reducer(state, action);
};
Expand Down