Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

onClick on Decorators not working #159

Open
erick-couto opened this issue Feb 26, 2019 · 0 comments
Open

onClick on Decorators not working #159

erick-couto opened this issue Feb 26, 2019 · 0 comments

Comments

@erick-couto
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant