R
Reactiflux

help-threads-react

Deepak – 06-47 Aug 10

DDeepak8/10/2022
How can I navigate a list through arrow keys?
{SearchResult.map((country)=>{
return <div className='border-b'>{country.properties.name}</div>
})}
{SearchResult.map((country)=>{
return <div className='border-b'>{country.properties.name}</div>
})}
SScriptyChris8/10/2022
What do you mean by navigate? Highlight list items or what?
DDeepak8/10/2022
its a search suggestion. kind of drop down of countries when i type. but i want to select the right country using the arrow keys
SScriptyChris8/10/2022
I suggest you use <datalist> element https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist It handles arrow key navigation out of the box
DDeepak8/10/2022
I can use many npm packages if were to handle it out of the box but thanks for your suggestion
UUUnknown User8/10/2022
Message Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

help-threads-react

Join Server