hello, so i tried doing that on the onChange function but somethings weird is happening
this is the onSelectChange:
onSelectChange(event) {
console.log("Before value set " + this.state.behavior);
this.setState({
behavior: +event.target.value,
});
console.log("After value set " + this.state.behavior);
}
this is the dropdown when it's called
<select
className="item"
defaultValue="4"
onChange={this.onSelectChange.bind(this)}
>
<option value="4">Supported By</option>
<option value="4.1">In Context Of</option>
<option value="4.2">Asserted</option>
<option value="4.3">Defeated</option>
<option value="4.4">Axiomatic</option>
<option value="4.5">NeedsSupport</option>
<option value="4.6">Assumed</option>
<option value="4.7">Abstract</option>
<option value="4.8">AsCited</option>
<option value="3">LinkShapes</option> </select>
and this is on the link created :
onLinkCreated={(sender, args) => {
var behave = this.state.behavior;
console.log("actual value " + behave);
they return different values so i was confused, on the link created the behaviour value is correct but on the on change value it's wrong, since i'm trying to use a conditional for each linkshape
do you have any idea why is this happening? below is the log