質問

I want a Text Field to appear when a certain item is chosen from a drop-down list. I'm using a change event.

if(this.rawValue == 1){
Tolerance.presence = "visible";
}
else{
Tolerance.presence = "hidden";
}

The problem is that the Text Field presence does not change immediately when a selection is made, but only after I go back to the list box and select again (any value, not just the same one).

役に立ちましたか?

解決

The new value of the dropdown only registers after the change event. This means this.rawValue points to the old value of the dropdown in a change event.

Either move your script dropdown exit event or make use of the event.newText in the if conditional in the change event.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top