- {city1Airports.map((ap: IAirport) => (
-
onSelect(ap.code)}
- onKeyDown={(e) => {
- if (e.key === "Enter" || e.key === " ") onSelect(ap.code);
- }}
- >
- {ap.name}
-
- ))}
+ {city1Airports.map((ap: IAirport) => {
+ const apId = `picker-item-${ap.code}`;
+ const isApHighlighted = apId === activeItemId;
+ return (
+
onSelect(ap.code)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" || e.key === " ") onSelect(ap.code);
+ }}
+ >
+ {ap.name}
+
+ );
+ })}