+
{curr.title}
+ {curr.items.map((item, itemIdx) => {
+ if (!item.toLowerCase().startsWith(filterValue)) return null
+ const index = acc.itemIndex++
+ return
{
+ console.log(inputItems, highlightedIndex, '???')
+ handleItemSelected(inputItems[highlightedIndex])
+ toggleMenu()
+ }}
+ >
+ {item}
+
+ })}
+
+ )
+ return acc
+ }, { sections: [] as any[], itemIndex: 0 }).sections}