open-vault/ui/stories/form-field-groups.md
Noelle Daley 30dd63b47e
ui/storybook/add form components (#6533)
* storybook: add .md suffix to stories blueprint

* storybook: add FormField

* storybook: update AuthConfigForm docs

* storybook: add FormFieldGroups

* storybook: add MaskedInput

* storybook: add example FormField attr

* storybook: remove actions addon
2019-04-05 14:58:55 -07:00

1.3 KiB

FormFieldGroups

FormFieldGroups components are field groups associated with a particular model. They render individual FormField components.

Param Type Default Description
[renderGroup] String A whitelist of groups to include in the render.
model DS.Model Model to be passed down to form-field component. If fieldGroups is present on the model then it will be iterated over and groups of FormField components will be rendered.
onChange Func Handler that will get set on the FormField component.

Example

{{if model.fieldGroups}}
 <FormFieldGroups @model={{model}} />
{{/if}}

...

<FormFieldGroups
 @model={{mountModel}}
 @onChange={{action "onTypeChange"}}
 @renderGroup="Method Options"
/>

See