(props: CellProps & VanillaRendererProps)
| 37 | value === '' ? undefined : parseInt(value, 10); |
| 38 | |
| 39 | export const IntegerCell = (props: CellProps & VanillaRendererProps) => { |
| 40 | const { data, className, id, enabled, uischema, path, handleChange } = props; |
| 41 | |
| 42 | return ( |
| 43 | <input |
| 44 | type='number' |
| 45 | step='1' |
| 46 | value={data ?? ''} |
| 47 | onChange={(ev) => handleChange(path, toNumber(ev.target.value))} |
| 48 | className={className} |
| 49 | id={id} |
| 50 | disabled={!enabled} |
| 51 | autoFocus={uischema.options && uischema.options.focus} |
| 52 | /> |
| 53 | ); |
| 54 | }; |
| 55 | /** |
| 56 | * Default tester for integer controls. |
| 57 | * @type {RankedTester} |
nothing calls this directly
no test coverage detected
searching dependent graphs…