Im trying to update a field when a user press ‘Enter’ in the input field. I wrote this:
$w(" #userInput “).onKeyPress((event) => { if (event.key === “Enter”) { console.log(event.context); console.log($w(” #userInput ").value); } });
this works fine if both elements are in a page, but if I drag them to a container in a repeater object, then the value is not giving me the current value (but rather the previous value/empty value)
i would expect it to print the string that i put in the input field as I expected it to do.
Any ideas why this is happening and how to make this work?