ant-design/components/input-number/demo/change-on-wheel.tsx

14 lines
347 B
TypeScript
Raw Normal View History

import React from 'react';
import type { InputNumberProps } from 'antd';
import { InputNumber } from 'antd';
const onChange: InputNumberProps['onChange'] = (value) => {
console.log('changed', value);
};
const App: React.FC = () => (
<InputNumber min={1} max={10} defaultValue={3} onChange={onChange} changeOnWheel />
);
export default App;