mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(ui): use InputNumber for number-typed fields in default user settings
Adds a type === "number" case in renderEditableField so max_budget renders as an InputNumber instead of a free-text TextInput. Prevents string input and fixes null displaying as "null" in the field.
This commit is contained in:
parent
af750949b1
commit
e34b7ec490
1 changed files with 13 additions and 0 deletions
|
|
@ -386,6 +386,19 @@ const DefaultUserSettings: React.FC<DefaultUserSettingsProps> = ({
|
|||
))}
|
||||
</Select>
|
||||
);
|
||||
} else if (type === "number") {
|
||||
return (
|
||||
<InputNumber
|
||||
style={{ width: "100%" }}
|
||||
value={editedValues[key] as number | undefined}
|
||||
onChange={(value) => handleTextInputChange(key, value)}
|
||||
placeholder={property.description || ""}
|
||||
className="mt-2"
|
||||
min={0}
|
||||
step={0.01}
|
||||
precision={2}
|
||||
/>
|
||||
);
|
||||
} else if (type === "string" && property.enum) {
|
||||
return (
|
||||
<Select
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue