From ed919a016b150d0938aee25b5550bacf29f04e83 Mon Sep 17 00:00:00 2001 From: alex-krasn <64093224+alex-krasn@users.noreply.github.com> Date: Tue, 21 Jul 2020 12:52:36 -0700 Subject: [PATCH] fix: reset model name after train (#434) --- src/react/components/pages/train/trainPage.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/react/components/pages/train/trainPage.tsx b/src/react/components/pages/train/trainPage.tsx index ba18b1fbb..aea8d3f12 100644 --- a/src/react/components/pages/train/trainPage.tsx +++ b/src/react/components/pages/train/trainPage.tsx @@ -45,6 +45,7 @@ export interface ITrainPageState { showTrainingFailedWarning: boolean; trainingFailedMessage: string; hasCheckbox: boolean; + modelName: string; } interface ITrainApiResponse { @@ -74,8 +75,6 @@ function mapDispatchToProps(dispatch) { @connect(mapStateToProps, mapDispatchToProps) export default class TrainPage extends React.Component { - private modelName: string = ""; - constructor(props) { super(props); @@ -88,6 +87,7 @@ export default class TrainPage extends React.Component {!this.state.isTraining ? ( @@ -229,7 +230,7 @@ export default class TrainPage extends React.Component, text: string) => { - this.modelName = text; + this.setState({modelName: text}); } private handleTrainClick = () => { @@ -243,6 +244,7 @@ export default class TrainPage extends React.Component { this.setState({ @@ -299,7 +301,7 @@ export default class TrainPage extends React.Component