Skip to content

Commit

Permalink
Fix M1M3 force dropdown selection behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-aranda committed Jul 19, 2024
1 parent eaac0d4 commit bc4d064
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions love/src/components/MainTel/M1M3/M1M3.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export default class M1M3 extends Component {
colormap: () => '#fff',
width: 480,
zoomLevel: 1,
selectedForceInput: '',
selectedForceParameter: '',
selectedForceInput: null,
selectedForceParameter: null,
showActuatorsID: true,
showHardpoints: true,
actuatorsForce: [],
Expand Down Expand Up @@ -354,6 +354,7 @@ export default class M1M3 extends Component {
const filteredParameters = M1M3ActuatorForces[force];
this.setState({
selectedForceInput: force,
selectedForceParameter: null,
forceParameters: filteredParameters,
});
};
Expand Down Expand Up @@ -544,15 +545,15 @@ export default class M1M3 extends Component {
<span>Select force input:</span>
<Select
options={forceInputs}
option={null}
option={this.state.selectedForceInput}
onChange={(selection) => this.forceInputSelected(selection)}
/>
</div>
<div className={styles.control}>
<span>Select force parameter:</span>
<Select
options={forceParameters}
option={null}
option={this.state.selectedForceParameter}
onChange={(selection) => this.forceParameterSelected(selection)}
/>
</div>
Expand Down

0 comments on commit bc4d064

Please sign in to comment.