Добавлен NumericInput для соответствующей фабрики столбцов

This commit is contained in:
Александр Сироткин 2021-12-17 10:10:29 +05:00
parent ce486dd17b
commit 3f32269b6f

View File

@ -1,5 +1,5 @@
import { ReactNode } from 'react'
import { Select, Table as RawTable } from 'antd'
import { InputNumber, Select, Table as RawTable } from 'antd'
import { OptionsType } from 'rc-select/lib/interface'
import { tryAddKeys } from './EditableTable'
import { makeNumericSorter, makeStringSorter} from './sorters'
@ -144,7 +144,8 @@ export const makeNumericColumn = (
onFilter: filterDelegate ? filterDelegate(dataIndex) : null,
sorter: makeNumericSorter(dataIndex),
width: width,
render: renderDelegate??makeNumericRender(),
input: <InputNumber style={{ width: '100%' }}/>,
render: renderDelegate ?? makeNumericRender(),
align: 'right',
...other
})