<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@datashaper/react](./react.md) &gt; [useSpinButtonChangeHandler](./react.usespinbuttonchangehandler.md)

## useSpinButtonChangeHandler() function

Enforces numeric values for a SpinButton onChange.

<b>Signature:</b>

```typescript
export declare function useSpinButtonChangeHandler<T extends object | void | unknown>(step: Step<T>, updateFn: (step: Step<T>, newValue: string | undefined) => void, onChange?: StepChangeFunction<T>): SpinButtonChangeHandler;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  step | Step&lt;T&gt; | the step object |
|  updateFn | (step: Step&lt;T&gt;, newValue: string \| undefined) =&gt; void | the update function |
|  onChange | StepChangeFunction&lt;T&gt; | <i>(Optional)</i> the onchange handler |

<b>Returns:</b>

[SpinButtonChangeHandler](./react.spinbuttonchangehandler.md)


