PipedreamHQ / PipedreamHQ/pipedream
[BUG] Custom value on "type[]" prop with options does not evaluate to array
- Dominant language
- JavaScript
- Stars
- 11.7k
- Forks
- 5.8k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 102
Description
**Describe the bug**
A prop typed `string[]` is properly recognized as an array, both by the standard UI and by the "custom value" methods of assigning a value.


However, if the prop has options for the user to select, the UI displays checkboxes (i.e. the user can select one or more, since the value is an array), but the "custom value" is treated as `string` instead of `string[]` (array).


And whatever custom value is passed is indeed received as a string by the action when running it. which will break the action in many cases (if processing the prop with array methods such as `map` or `join`).
**To Reproduce**
After some digging, I've found a Dropbox action that can reproduce this easily, and you can create a Dropbox account within a minute, from the authentication pop-up itself, if you do not have one.
1. Create a workflow with the Dropbox action 'Search files and folders'
2. Add the 'File categories' optional prop. Since this is a `string[]` prop with `options`, the situation above can be reproduced
3. If you enter a custom value, it will be parsed as a string, and the action will fail to run:

**Expected behavior**
Custom values should be parsed as arrays in props that are typed as arrays, even if they have an options selection - which is possibly determining the current behavior without checking for the array case.
Contributor guide
Assessment
This issue has not been assessed yet.