Skip to content

Commit

Permalink
Added validation for number
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Sep 8, 2022
1 parent b41c645 commit 966485b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/src/app/admin/component/ConfigurationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ export function ConfigurationForm({ configurations, configuration = {}, loading,
<Form.Control
type={p.displayType === 'number' ? 'number' : 'text'}
placeholder="value"
{...register(`properties.${idx}.propertyValue`)} />
{...register(`properties.${idx}.propertyValue`, {
valueAsNumber: p.displayType === 'number'
})} />
</FloatingLabel>
:
<Form.Check type="switch"
Expand Down

0 comments on commit 966485b

Please sign in to comment.