You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add configurable delimiter for dropdown block options (#348)
* feat: Add configurable delimiter for dropdown block options
Users can now customize the label/value delimiter for dropdown options (previously hardcoded to ":""). This enables support for data containing colons, such as URLs or timestamps. The delimiter is configurable in the UI modal and defaults to ":".
- Add delimiter prop to Dropdown struct with default ":"
- Implement delimiter-aware option parsing in Rust backend
- Add UI field in config modal to customize delimiter
- Include comprehensive tests for custom delimiters
- Update documentation with examples
* docs: Add custom delimiter section to dropdown documentation
* fmt
* test: Add parseOption tests for delimiter boundary handling
* refactor: extract parseOption to own module for testability
Extract the parseOption function from Dropdown.tsx to a separate
parseOption.ts file so it can be tested without importing the entire
Dropdown module and its browser dependencies.
* remove accidental bindings
* sdjfs;d
Copy file name to clipboardExpand all lines: docs/docs/blocks/executable/dropdown.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,21 @@ Execute a shell command that returns a list of options. Supports multiple interp
37
37
kubectl get pods --no-headers | awk '{print $1}'
38
38
```
39
39
40
+
### Custom Delimiter
41
+
42
+
By default, the dropdown uses `:` to separate labels from values (e.g., `Label:value`). If your data contains colons (such as URLs or timestamps), you can customize the delimiter in the dropdown settings.
43
+
44
+
Open the dropdown configuration modal and set the **Label/Value Delimiter** field to any character or string:
45
+
46
+
| Delimiter | Example |
47
+
|-----------|---------|
48
+
|`:` (default) |`Production:prod`|
49
+
|`\|`|`Production\|https://api.example.com:8080`|
50
+
|`::`|`My Label::my-value`|
51
+
|`->`|`Display Name->actual_value`|
52
+
53
+
This allows you to use label:value pairs even when your values contain the default delimiter character.
54
+
40
55
### Template Usage
41
56
42
57
The selected value can be accessed in other blocks using the variable name:
0 commit comments