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 item = items[index];
|
||||||
const config = parseConfig(item);
|
const config = parseConfig(item);
|
||||||
|
|
||||||
// Convert value to number if it's a number input
|
if (type === 'checkbox')
|
||||||
const processedValue = type === 'number' ? Number(value) : value;
|
config[key] = checked ? 'true' : 'false';
|
||||||
|
else
|
||||||
config[key] = type === 'checkbox' ? checked : processedValue;
|
config[key] = value;
|
||||||
|
|
||||||
onChange(index, {
|
onChange(index, {
|
||||||
...item,
|
...item,
|
||||||
|
|||||||
Reference in New Issue
Block a user