move plant deselect to after navigation
This commit is contained in:
parent
122722e3c1
commit
f34fb03b41
|
@ -10,6 +10,7 @@ import { AxisInputBox } from "../../controls/axis_input_box";
|
|||
import { isNumber } from "lodash";
|
||||
import { Actions } from "../../constants";
|
||||
import { validBotLocationData } from "../../util/util";
|
||||
import { unselectPlant } from "../actions";
|
||||
|
||||
export function mapStateToProps(props: Everything) {
|
||||
return {
|
||||
|
@ -90,6 +91,10 @@ export class MoveToForm extends React.Component<MoveToFormProps, MoveToFormState
|
|||
@connect(mapStateToProps)
|
||||
export class MoveTo extends React.Component<MoveToProps, {}> {
|
||||
|
||||
componentDidMount() {
|
||||
unselectPlant(this.props.dispatch)();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.props.dispatch({
|
||||
type: Actions.CHOOSE_LOCATION,
|
||||
|
|
|
@ -11,10 +11,6 @@ import { unselectPlant } from "../actions";
|
|||
@connect(mapStateToProps)
|
||||
export class PlantInfo extends PlantInfoBase {
|
||||
|
||||
componentWillUnmount() {
|
||||
unselectPlant(this.props.dispatch)();
|
||||
}
|
||||
|
||||
default = (plant_info: TaggedPlantPointer) => {
|
||||
const info = formatPlantInfo(plant_info);
|
||||
const { name, id } = info;
|
||||
|
|
Loading…
Reference in a new issue