I am trying to use menubar template with react router:
Code: Select all
const items = [
{
label: 'Cliente',
icon: 'pi pi-fw pi-user',
items: [
{
label: 'Novo',
template: (item, options) => {
return (
<Link to="/cadastro/usuario" className={options.className} target={item.target} >
<span className={options.labelClassName}>{item.label}</span>
</Link>
)
}
}
}
If i put the onClick event option, the router doesnt work and the menu is closed...
i appreciate for some help thanks !