appuniversum / ember-appuniversum

Ember addon wrapping the appuniversum components.
https://appuniversum.github.io/ember-appuniversum
MIT License
14 stars 11 forks source link

Use of native `input` element in `au-toggle-switch` component #451

Closed elpoelma closed 7 months ago

elpoelma commented 9 months ago

Is your feature request related to a problem? Please describe the use case and problem it solves.

Currently, the au-toggle-switch component still uses the custom ember Input element which promotes two-way-binding. It is not possible to pass the checked attribute to the Input element, only the @checked attribute.

Describe the solution you'd like

If the @checked attribute is not passed to the au-toggle-switch component, it could be a solution to use the native input element instead, just as how au-input implements it. This would allow users of this library to pass all allowed attributes of an input element, including the native checked input-attribute.

Which project(s) or feature(s) is this related to

We required the use of the native input element in a plugin for the editor. For now, we implemented a custom toggle-switch component: https://github.com/lblod/ember-rdfa-editor/blob/ebd8b2eb6a70a010e8130a553e6bb09d55650d22/tests/dummy/app/templates/space-invisible.hbs.

Windvis commented 9 months ago

It's already changed to the native input on the v3 branch, so this should be fixed once we release v3: https://github.com/appuniversum/ember-appuniversum/pull/446/files#diff-d7b5258a5a79a9835ab3cbe6acb732855cab12873389eaae0f8ae4e624a7fc5d

Windvis commented 7 months ago

Released as part of v3.0.0 👍