tleunen / react-mdl

React Components for Material Design Lite
https://tleunen.github.io/react-mdl/
MIT License
1.76k stars 255 forks source link

The onChange handler and onSubmit won't fire when is nested inside the mdl layout #366

Open edwardGunawan opened 8 years ago

edwardGunawan commented 8 years ago

My code for the onSubmit button, and the onChange input type='file' button won't work inside the mdl layout. However, If i just put the component into the ReactDOM and render it, it works perfectly fine. I don't know what are the bugs is and this is the overall project that I have. Please help thank you!

This is the input box for DMD:

screen shot 2016-08-15 at 12 04 34 pm

This is the DMD component:

screen shot 2016-08-15 at 12 05 18 pm

This is the ReactDOM render function:

screen shot 2016-08-15 at 12 05 55 pm

This is the layout for the main function:

screen shot 2016-08-15 at 12 06 22 pm

So if I just put the DMD component inside the ReactDOM (app.jsx) component it works, but if I put it inside the main.jsx which is the layout for the main, it won't fire the eventListener.

This is my github repo just in case github/edwardGunawan/Printer.

Thanks a lot!

edwardGunawan commented 8 years ago

Update: after removing mdl-js-layout, DMD component works perfectly fine. Why wouldn't it work with mdl-js-layout?

tleunen commented 8 years ago

Hey @edwardGunawan, thanks for reporting the issue. Could you please setup a small codepen or even repo with the issue so I can easily reproduce and investigate why this is happening?