I'm working on a component which won't have any input/select element but I want it to behave like one, dispatching the same events a React input does, expecting to have something like this working:
<div onChange={this.onChange}>
<MyComponent/>
<input type="text"/>
</div>
In that example, both, input and MyComponent should reach the this.onChange listener.
I know how to dispatch real DOM events, but that's not making it to the onChange listener, only to a real addEventListener on the DOM:
var event = document.createEvent('HTMLEvents');
event.initEvent('change', true, false);
this.getDOMNode().dispatchEvent(event);
Maybe the answer is here (or here?), but I'm still struggling with this.
UPDATE
Thanks to @limelights for preparing a playground: