diff --git a/Adding-a-new-operation.md b/Adding-a-new-operation.md index ef82b5b..b89bfd8 100644 --- a/Adding-a-new-operation.md +++ b/Adding-a-new-operation.md @@ -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.