diff --git a/public/pages/CreateRollup/containers/CreateRollup/CreateRollup.tsx b/public/pages/CreateRollup/containers/CreateRollup/CreateRollup.tsx index 92905139e..ddef06dc0 100644 --- a/public/pages/CreateRollup/containers/CreateRollup/CreateRollup.tsx +++ b/public/pages/CreateRollup/containers/CreateRollup/CreateRollup.tsx @@ -13,7 +13,6 @@ import CreateRollupSteps from "../../components/CreateRollupSteps"; import IndexService from "../../../../services/IndexService"; import { IndexItem } from "../../../../../models/interfaces"; import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; -import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent"; interface CreateRollupProps extends RouteComponentProps, DataSourceMenuProperties { rollupService: RollupService; diff --git a/public/pages/CreateTransform/containers/CreateTransformForm/CreateTransformForm.tsx b/public/pages/CreateTransform/containers/CreateTransformForm/CreateTransformForm.tsx index 1c788e442..644a01710 100644 --- a/public/pages/CreateTransform/containers/CreateTransformForm/CreateTransformForm.tsx +++ b/public/pages/CreateTransform/containers/CreateTransformForm/CreateTransformForm.tsx @@ -89,52 +89,54 @@ export class CreateTransformForm extends Component) { + if (prevProps.dataSourceId !== this.props.dataSourceId) { + // reset the state, if dataSourceId changes, i.e., clear state + this.setState({ + ...CreateTransformForm.baseState, + transformId: this.state.transformId, + description: this.state.description, + }); + } + } + componentWillUnmount() { this._isMount = false; } diff --git a/public/pages/CreateTransform/containers/SetUpIndicesStep/SetUpIndicesStep.tsx b/public/pages/CreateTransform/containers/SetUpIndicesStep/SetUpIndicesStep.tsx index 04fa983ac..b4689d0b9 100644 --- a/public/pages/CreateTransform/containers/SetUpIndicesStep/SetUpIndicesStep.tsx +++ b/public/pages/CreateTransform/containers/SetUpIndicesStep/SetUpIndicesStep.tsx @@ -12,8 +12,9 @@ import TransformIndices from "../../components/TransformIndices"; import CreateTransformSteps from "../../components/CreateTransformSteps"; import IndexService from "../../../../services/IndexService"; import { FieldItem, IndexItem } from "../../../../../models/interfaces"; +import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext"; -interface SetUpIndicesStepProps extends RouteComponentProps { +interface SetUpIndicesStepProps extends RouteComponentProps, DataSourceMenuProperties { transformService: TransformService; indexService: IndexService; transformId: string; @@ -59,7 +60,7 @@ export default class SetUpIndicesStep extends Component { - +