From 4bc41e2c2a8b3fc8b22226a7f3ec6cc1e1a275b6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 21 May 2018 17:58:04 +0200 Subject: more dropdowns --- app/client/live/actions.js | 5 +++++ app/client/live/index.js | 26 +++++++++++++++++++++++++- app/client/live/reducer.js | 7 +++++++ 3 files changed, 37 insertions(+), 1 deletion(-) (limited to 'app/client/live') diff --git a/app/client/live/actions.js b/app/client/live/actions.js index 5ee030a..026788d 100644 --- a/app/client/live/actions.js +++ b/app/client/live/actions.js @@ -16,6 +16,11 @@ export const list_checkpoints = () => { return { type: 'LOADING_CHECKPOINTS', } } +export const list_epochs = (path) => { + socket.list_epochs(path) + return { type: 'LOADING_EPOCHS', } +} + export const list_sequences = () => { socket.list_sequences() return { type: 'LOADING_SEQUENCES', } diff --git a/app/client/live/index.js b/app/client/live/index.js index c438e4b..5699266 100644 --- a/app/client/live/index.js +++ b/app/client/live/index.js @@ -16,8 +16,13 @@ class App extends Component { props.actions.list_checkpoints() props.actions.list_sequences() } + componentWillUpdate(nextProps) { + console.log('willupdate', nextProps.opt) + if (nextProps.opt.checkpoint_name !== this.props.opt.checkpoint_name) { + this.props.actions.list_epochs(nextProps.opt.checkpoint_name) + } + } render(){ - const props = this.props return (
@@ -32,6 +37,21 @@ class App extends Component { title='view mode' options={['a','b','sequence','recursive']} /> + +