ranile / material-yew

Yew wrapper for Material Web Components
https://material-yew.rm.rs
Apache License 2.0
230 stars 35 forks source link

Cannot bind events to buttons? #19

Open delbato opened 2 years ago

delbato commented 2 years ago

As far as i could gather, there is no way to bind a callback directly to any component as none are defined in the respective *Props.
This especially makes elements like MatButton pretty useless - i had to wrap it in a div and listen to events in that div. Am i misunderstanding something or is this actually a missing feature?

ranile commented 2 years ago

It's a limitation of Yew right now. See https://github.com/yewstack/yew/issues/1533

mohs8421 commented 2 years ago

Am I missing some information, or is that statement limited @hamza1311 ? Because there are for example oninput events available for MatTextField, so maybe it does not allow to use any existing event right now, but it should be possible to provide an onclick event.