From 09f61f8d1e10de81f6f5d18ff372744715aa62c4 Mon Sep 17 00:00:00 2001
From: brynnchernosky <56202540+brynnchernosky@users.noreply.github.com>
Date: Thu, 4 May 2023 21:16:36 -0400
Subject: debug wrong start values for input fields

---
 src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx')

diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx
index 3386bfd1c..353b386a6 100644
--- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx
+++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx
@@ -37,12 +37,15 @@ export default class InputField extends React.Component<IInputProps, IState> {
       tempRadianValue: this.props.mode != "Freeform" && !this.props.showIcon ? 0 : (Number(this.props.value) * Math.PI) / 180,
       width: this.props.small ? "6em" : "7em",
       margin: this.props.small ? "0px" : "10px"
-
     }
   }
 
   epsilon: number = 0.01;
 
+  componentDidMount(): void {
+    this.setState({tempValue: Number(this.props.value)})
+  }
+
   componentDidUpdate(prevProps: Readonly<IInputProps>, prevState: Readonly<IState>, snapshot?: any): void {
     if (prevProps.value != this.props.value && !isNaN(this.props.value)) {
       if (this.props.mode == "Freeform") {
-- 
cgit v1.2.3-70-g09d2

