alpertuna / react-metismenu

A ready / simple to use, highly customizable, updateable, ajax supported, animated and material designed menu component for React

Home Page:https://www.npmjs.com/package/react-metismenu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom Properties For Each Item In Content

jgarmar opened this issue · comments

I'm trying to add a custom property of type object for each item in content array and when I trigger this.props.activateMe my custom property isn't located in this.props. How Can I access to this property??
Thanks

Hi @jmgarciamari, only these properties are injected.
If you use your own custom link component, you can pass your custom object via to key of menu item like this;

const content = [
  {
    icon: 'icon-class-name',
    label: 'Label of Item',
    to: { /* your custom object */ },
  },
  //...
];