Skip to content

Commit

Permalink
improved conditional for number type
Browse files Browse the repository at this point in the history
  • Loading branch information
bekossy committed Mar 12, 2024
1 parent ed81b5d commit f02b677
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ const DynamicFormField: React.FC<DynamicFormFieldProps> = ({
>
{type === "string" || type === "regex" ? (
<Input />
) : type === "number" ? (
) : type === "number" && label === "Similarity Threshold" ? (
<InputNumber min={0} max={1} step={0.1} />
) : type === "number" && label === "Threshold" ? (
<InputNumber />
) : type === "boolean" || type === "bool" ? (
<Switch />
) : type === "text" ? (
Expand Down

0 comments on commit f02b677

Please sign in to comment.