storybook-eol/react-treebeard

onClick on Decorators not working

erick-couto opened this issue · 0 comments

Hi, i dont can use a method on onClick:

const modifiedDecorators = Object.assign({},decorators, { Header: (props) => {
return (



{props.node.name}
<img src={BtnOn} className="header_items-img" onClick={() => this.handleDay()} />



);
}});

..

class Filter extends Component..
on constructor..

this.handleDay = this.handleDay.bind(this);

method:
handleDay = (event) => {
console.log("day");
this.setState({
chartFilterDemand: 'day'
})
}

and on render method:

But onClick don´t work, can you help me?