github.com/argoproj/argo-cd@v1.8.7/ui/src/app/shared/components/number-field.tsx (about) 1 import * as React from 'react'; 2 import * as ReactForm from 'react-form'; 3 4 export const NumberField = ReactForm.FormField((props: {fieldApi: ReactForm.FieldApi; className: string}) => { 5 const { 6 fieldApi: {getValue, setValue}, 7 ...rest 8 } = props; 9 10 return <input {...rest} className={props.className} type='number' value={getValue()} onChange={el => setValue(parseInt(el.target.value, 10))} />; 11 });