Bacancy Technology
Bacancy Technology represents the connected world, offering innovative and customer-centric information technology experiences, enabling Enterprises, Associates and the Society to Riseâ„¢.
12+
Countries where we have happy customers
1050+
Agile enabled employees
06
World wide offices
12+
Years of Experience
05
Agile Coaches
14
Certified Scrum Masters
1000+
Clients projects
1458
Happy customers
Artificial Intelligence
Machine Learning
Salesforce
Microsoft
SAP
July 27, 2023
export function App(props) { const firstNameRef = useRef(null) const lastNameRef = useRef(null) // Let’s create a function which will help us to control focus in input const changeInputFocus = (event, nextInputRef) => { event.preventDefault() // We can use key name on which we need to perform logic if (event.key === 'Tab' || event.key === 'Enter') { nextInputRef.current.focus(); } }; return ( <div className='App'> <label>First name </label> <input ref={firstNameRef} type='text' onKeyDown={(event) => changeInputFocus(event, lastNameRef)} /> <label>Last name </label> <input ref={lastNameRef} type='text' /> </div > ); }