You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Much of this is inspired by the work i've done with ember-form-for.
One component for every HTML5 input type
I'd like to add one component for each HTML5 input type, all these extend a common base input.
This is especially useful for the types: checkbox, radio, date, time, file.
A few examples:
The checkbox and radio type use the checked attribute.
date, time, datetime-local can have some magic added to transform Date objects into the correct string and back. See date-input in ember-form-for
The file type should pass the files.
It is possible to build all this into the {{one-way-input}} but IMO that would add a lot of complexity.
Also, there is the component helper, so instead of assigning the type attribute, you can use the component helper to pick the right type of input. Another pro is, that if you want a textarea or select, this would fall into the same algorithm, instead of having that be a special case.
The first positionalParam should be value, checked, selected, etc. depending on the type of control
That way you don't have to think about what property you have to set to get the desired effect, all components have the same consistent way of accepting the value.
I'd like to suggest a few [BREAKING] changes
Much of this is inspired by the work i've done with
ember-form-for
.One component for every HTML5 input type
I'd like to add one component for each HTML5 input type, all these extend a common base input.
This is especially useful for the types:
checkbox
,radio
,date
,time
,file
.A few examples:
checkbox
andradio
type use thechecked
attribute.date
,time
,datetime-local
can have some magic added to transformDate
objects into the correct string and back. Seedate-input
inember-form-for
file
type should pass the files.It is possible to build all this into the
{{one-way-input}}
but IMO that would add a lot of complexity.Also, there is the
component
helper, so instead of assigning thetype
attribute, you can use thecomponent
helper to pick the right type of input. Another pro is, that if you want a textarea or select, this would fall into the same algorithm, instead of having that be a special case.The first positionalParam should be
value
,checked
,selected
, etc. depending on the type of controlThat way you don't have to think about what property you have to set to get the desired effect, all components have the same consistent way of accepting the value.
Example:
Also
See: @rwjblue's comment in issue #28
Thoughts?
The text was updated successfully, but these errors were encountered: