Problem
When a config schema has multiple autocomplete fields where one depends on another's value (e.g., selecting a Jira project first, then filtering issue types by that project), there's no way to pass the current value of one field as a query parameter to another field's autocomplete URL.
Currently, FormAutocomplete only passes the search term (q) as a query parameter. The URL is fully static.
Use Case
The Jira integration in flowdrop-rs has these config fields:
- account - autocomplete selecting a Jira account secret
- project - autocomplete listing projects (needs
account to authenticate)
- issue_type - autocomplete listing issue types (needs
account + project)
- assignee - autocomplete searching users (needs
account + project)
The backend endpoints in flowdrop-rs are ready:
GET /api/flowdrop/jira/projects?account={account}
GET /api/flowdrop/jira/issue-types?account={account}&project={project}
GET /api/flowdrop/jira/users?account={account}&project={project}&q={query}
But the frontend can't pass the selected account and project values to these URLs.
Proposed Solution
Add an optional params field to AutocompleteConfig:
interface AutocompleteConfig {
url: string;
// ... existing fields ...
/** Map of URL query parameter names to config field names.
* When fetching autocomplete options, the current value of
* each referenced field is appended as a query parameter.
*
* Example: { "account": "account", "project": "project" }
* If the "account" field has value "my-jira", the fetch URL becomes:
* /api/flowdrop/jira/issue-types?account=my-jira&q=...
*/
params?: Record<string, string>;
}
In FormAutocomplete, when building the fetch URL, iterate over params and append each mapped field's current value from the form state.
Bonus: Reactive refresh
When a dependency field value changes (e.g., user selects a different project), the dependent autocomplete should:
- Clear its current value (since it may no longer be valid)
- Refetch options on next focus
Backend Type (already in place)
The Rust AutocompleteConfig struct in flowdrop-rs would add:
pub params: Option<HashMap<String, String>>,
Context
This was identified during the implementation of Jira integration node types (flowdrop-rs 005-jira-node-types). The backend proxy endpoints and node config schemas are ready — only the frontend parameter passing is missing.
Problem
When a config schema has multiple autocomplete fields where one depends on another's value (e.g., selecting a Jira project first, then filtering issue types by that project), there's no way to pass the current value of one field as a query parameter to another field's autocomplete URL.
Currently,
FormAutocompleteonly passes the search term (q) as a query parameter. The URL is fully static.Use Case
The Jira integration in flowdrop-rs has these config fields:
accountto authenticate)account+project)account+project)The backend endpoints in flowdrop-rs are ready:
GET /api/flowdrop/jira/projects?account={account}GET /api/flowdrop/jira/issue-types?account={account}&project={project}GET /api/flowdrop/jira/users?account={account}&project={project}&q={query}But the frontend can't pass the selected
accountandprojectvalues to these URLs.Proposed Solution
Add an optional
paramsfield toAutocompleteConfig:In
FormAutocomplete, when building the fetch URL, iterate overparamsand append each mapped field's current value from the form state.Bonus: Reactive refresh
When a dependency field value changes (e.g., user selects a different project), the dependent autocomplete should:
Backend Type (already in place)
The Rust
AutocompleteConfigstruct in flowdrop-rs would add:Context
This was identified during the implementation of Jira integration node types (flowdrop-rs
005-jira-node-types). The backend proxy endpoints and node config schemas are ready — only the frontend parameter passing is missing.