Open prateekbh opened 5 years ago
There currently carnival were I am, so I'm not available today
But that's a good idea
No worries... It isn't something to be fixed immediately. That's just something we confirm to as we update all the components.. Enjoy the carnival ☺️
I guess this is done is'nt it?
Tabs are remaining. 1 last one i guess
Possible
While we're writing components for 2.0, we should standardize the API got event handlers.
Currently with props all event handlers are native event handlers. E.g:
onChange
of a checkbox is the native onChange ofinput type=checkbox
This leads to some problems, mdc-web introduce some additional properties on top of native controls. E.g. checkbox has aindeterminate
state, select hasselectedIndex
etc.Getting these values from native event handlers which just pass the
Event
, is tricky and most times requires creating a ref.In order to solve this we can send added details to major event handlers(not necessarily all) like onChange for checkbox, select, onClick for button etc.
Current TS definition:
Updated version:
The additional object makes sure that it is not counter intuitive to users if 1.0