Closed priyankalad closed 3 years ago
Resolved. Solution: passed itemProps[index].ref as innerRef to Link element example:
const { ref, ...rest } = itemProps[idx]
return (
<Link
className={ddMenuItemCSS}
key={idx}
{...rest}
to={item.link}
id={`menuitem${idx}_${dataKey}`}
innerRef={ref}>
{item.name}
</Link>
)
Is there a way to use Link(React Router) instead of anchor tag as menu items.