Hi,
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
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.