react-sketch
react-sketch copied to clipboard
onObjectAdded event not triggered
I'm trying to find a way to trigger an event after drawing an object. I saw that there are onObjectAdded and also onMouseUp events being defined but neither of these are working.
<SketchField onObjectAdded={this.onBoundingBox} />
this also does not fire the event:
<SketchField onMouseUp={this.onBoundingBox} />
The content of this.onBoundingBox is just a console.log for now.
But this works with onChange.
I'm wondering if I did something wrong or if this is an issue? Do you have any examples of how to use the events?
@sonnyky , apparently, the npm package was not updated with the latest changes. Have tried to use https://www.npmjs.com/package/react-sketch2 which seems to be created due the same issues as in our case, the package handles onObjectAdded, etc. events
@nakusyat Thank you for the info. I'll give it a try this week and report how it goes