diff options
Diffstat (limited to 'app/client/live/index.js')
| -rw-r--r-- | app/client/live/index.js | 26 |
1 files changed, 25 insertions, 1 deletions
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 ( <div className='app'> <Player /> @@ -32,6 +37,21 @@ class App extends Component { title='view mode' options={['a','b','sequence','recursive']} /> + <Select + name='checkpoint_name' + title='checkpoint' + options={this.props.checkpoints} + /> + <Select + name='epoch' + title='epoch' + options={this.props.epochs} + /> + <Select + name='sequence_name' + title='sequence' + options={this.props.sequences} + /> </ParamGroup> </div> <div className='column'> @@ -146,6 +166,10 @@ class App extends Component { } const mapStateToProps = state => ({ + opt: state.live.opt, + checkpoints: state.live.checkpoints, + epochs: state.live.epochs, + sequences: state.live.sequences, }) const mapDispatchToProps = (dispatch, ownProps) => ({ |
