fix(ui): Don't convert form inputs from string
Action, connector, MCP, dynamic prompts and anything else that is stored as an array in the config; their fields are always stored as string by the backend. Signed-off-by: Richard Palethorpe <io@richiejp.com>
This commit is contained in:
@@ -62,10 +62,10 @@ const ConfigForm = ({
|
||||
const item = items[index];
|
||||
const config = parseConfig(item);
|
||||
|
||||
// Convert value to number if it's a number input
|
||||
const processedValue = type === 'number' ? Number(value) : value;
|
||||
|
||||
config[key] = type === 'checkbox' ? checked : processedValue;
|
||||
if (type === 'checkbox')
|
||||
config[key] = checked ? 'true' : 'false';
|
||||
else
|
||||
config[key] = value;
|
||||
|
||||
onChange(index, {
|
||||
...item,
|
||||
|
||||
Reference in New Issue
Block a user