Answers for "how to check the input on press of enter in tag input in react js"

11

on enter key press react

onKeyPress={(e) => e.key === 'Enter' && handleSearch()}
Posted by: Guest on February-16-2021
2

capture enter button react input

const Enter = () => {
  	const handle = () => console.log('Enter pressed');
  
	return <input type="text" onKeyDown={e => e.key === 'Enter' && handle} />;
};
Posted by: Guest on February-11-2021

Code answers related to "how to check the input on press of enter in tag input in react js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language