Skip to content

Is using a path as property argument for <BsForm::Element> supported? #1173

@jelhan

Description

@jelhan

A consumer may try to use a path as @property argument for <BsForm::Element>. Is this officially supported? Should we support it?

<BsForm
  @model={{hash
    address=(
      hash street=""
     )
  }}
  as |form|
>
  <form.element @property="address.street" />
</BsForm>

It seems to have worked in the past but was broken due to refactoring at least if using ember-changeset-validations as validation provider. We started to address it in ember-bootstrap/ember-bootstrap-changeset-validations#28 but more bugs were catched in ember-bootstrap/ember-bootstrap-changeset-validations#30. Before fixing in validation plugin I want to discuss if we have or want to commit to support in Ember Bootstrap itself.

It's not covered by current API docs:

The property name of the form element's model (by default the model of its parent Components.Form) that this form element should represent. The control element's value will automatically be bound to the model property's value.

Using this property enables form validation on this element.

I haven't had the time yet to go through the tests and see if we have test coverage for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions