vault/ui/stories/form-field-groups.md
Noelle Daley 67454f20e4
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

35 lines
1.3 KiB
Markdown

<!--THIS FILE IS AUTO GENERATED. This file is generated from JSDoc comments in app/components/form-field-groups.js. To make changes, first edit that file and run "yarn gen-story-md form-field-groups" to re-generate the content.-->
## FormFieldGroups
`FormFieldGroups` components are field groups associated with a particular model. They render individual `FormField` components.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [renderGroup] | <code>String</code> | <code></code> | A whitelist of groups to include in the render. |
| model | <code>DS.Model</code> | <code></code> | 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 | <code>Func</code> | <code></code> | Handler that will get set on the `FormField` component. |
**Example**
```js
{{if model.fieldGroups}}
<FormFieldGroups @model={{model}} />
{{/if}}
...
<FormFieldGroups
@model={{mountModel}}
@onChange={{action "onTypeChange"}}
@renderGroup="Method Options"
/>
```
**See**
- [Uses of FormFieldGroups](https://github.com/hashicorp/vault/search?l=Handlebars&q=FormFieldGroups)
- [FormFieldGroups Source Code](https://github.com/hashicorp/vault/blob/master/ui/app/components/form-field-groups.js)
---