Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchappell committed Aug 23, 2020
1 parent 7824e08 commit c576f4b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/formBuilder/options/onAddOption.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# onAddOption

transform the optionTemplate by return a modified template using the `onAddOption`

## Usage

```javascript
const options = {
onAddOption: (optionTemplate, optionIndex) => {
optionTemplate.label = `Option ${optionIndex + 1}`
optionTemplate.value = `option-${optionIndex + 1}`
return optionTemplate
},
}
$(container).formBuilder(options)
```

0 comments on commit c576f4b

Please sign in to comment.