Clear Text Field in perspective

I want to clear Text field on enter key press. On key down event If keycode is 13 then I am clearing text field.(like self.props.text=" ") But It is not working.
I am using textfield for barcode scan step. If there are two consecutive barcode step and I have entered value for 1st step and on enter key down it executes and gets complete but textfield not clearing and it takes same value for next step.
How can I do this, Any Idea?

Maybe try adding key code 10,line feed, or use a print statement to print out the key code that’s being pressed so you can see what’s going on. Note that print will go to the wrapper.log. system.perspective.print will go to the browser’s console

I have printed keycode in wrapper.log and getting 13 value.

Can you post the code you’re using? Make sure to enclose in 3 backticks (`, the key left of the ‘1’ key) or just use the preformatted text button image

1 Like

I am doing like this.

You must set “rejectUpdatesWhileFocused” property to false. When pressing the enter key, the text filed is focused and that will block any update on it. Therefore, by setting “rejectUpdatesWhileFocused” to false, you will allow the updates to be enforced on the components even when they are focused.