Skip to content

Commit c1bd45d

Browse files
committed
removed checkbox, shows chart on componentDidUpdate
1 parent 38f128f commit c1bd45d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

ui/src/containers/VisualiseForm/StatementsForm/TypeEditor.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ class TypeEditor extends Component {
2626
this.state.type === nextState.type
2727
)
2828

29-
onClickType = type => this.setState({ type })
30-
31-
onClickSubmit = () => {
29+
componentDidUpdate = () => {
3230
const path = ['type'];
3331
const value = this.state.type;
3432
this.props.updateModel({ path, value });
3533
}
3634

35+
onClickType = type => this.setState({ type })
36+
3737
getStateFromProps = props => ({ type: props.model.get('type') })
3838

3939
isActive = type => this.state.type === type
@@ -58,7 +58,6 @@ class TypeEditor extends Component {
5858
<VisualiseText type={this.state.type} />
5959
</div>
6060
<div className="col-xs-2 text-right">
61-
<a onClick={this.onClickSubmit} className="btn btn-primary btn-sm"><i className="icon ion-checkmark" /></a>
6261
</div>
6362
</div>
6463
}

ui/src/redux/create.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ export default function createStore(llClient, router, data) {
1616
];
1717

1818
let finalCreateStore;
19-
if (__DEVELOPMENT__ && __CLIENT__ && __DEVTOOLS__) {
19+
if (__DEVELOPMENT__ && __CLIENT__ && window.__REDUX_DEVTOOLS_EXTENSION__) {
2020
const { persistState } = require('redux-devtools');
2121
const DevTools = require('../containers/DevTools/DevTools');
2222

2323
finalCreateStore = compose(
2424
applyMiddleware(...middleware),
2525
window.devToolsExtension ? window.devToolsExtension() : DevTools.instrument(),
26-
persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/))
26+
persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)),
2727
)(_createStore);
2828
} else {
2929
finalCreateStore = applyMiddleware(...middleware)(_createStore);

0 commit comments

Comments
 (0)