Updated Adding a new operation (markdown)

n1474335 2018-12-25 19:06:18 +00:00
parent 5c2225261b
commit 455d71b630
1 changed files with 2 additions and 0 deletions

@ -50,11 +50,13 @@ Operation arguments (ingredients) can be set to any of the following types:
- User is presented with a checkbox, operation receives `true` or `false`.
7. `option`
- Given an array of strings, the user is presented with a dropdown selection box with each of those strings as an option. The selected string is sent to the operation.
- You can use the `defaultIndex` property to define which index should be selected by default, if required.
7. `populateOption`
- Given an array of `{name: "", value: ""}` objects, the user is presented with a dropdown selection box with the names as options. The corresponding value will be assigned to whichever argument index the `target` parameter is set to.
- See the *Regular expression* configuration in `src/core/config/OperationConfig.js` for an example of how this works.
8. `editableOption`
- Given an array of `{name: "", value: ""}` objects, the user is presented with an editable dropdown menu. The items in the dropdown are labelled with `name` and set the argument to `value` when selected.
- You can use the `defaultIndex` property to define which index should be selected by default, if required.
9. `toggleString`
- User is presented with a string input box with a toggleable dropdown attached.
- Populate the dropdown using the `toggleValues` property.