Добавлен 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 { 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 { OptionsType } from 'rc-select/lib/interface'
import { tryAddKeys } from './EditableTable' import { tryAddKeys } from './EditableTable'
import { makeNumericSorter, makeStringSorter} from './sorters' import { makeNumericSorter, makeStringSorter} from './sorters'
@ -144,6 +144,7 @@ export const makeNumericColumn = (
onFilter: filterDelegate ? filterDelegate(dataIndex) : null, onFilter: filterDelegate ? filterDelegate(dataIndex) : null,
sorter: makeNumericSorter(dataIndex), sorter: makeNumericSorter(dataIndex),
width: width, width: width,
input: <InputNumber style={{ width: '100%' }}/>,
render: renderDelegate ?? makeNumericRender(), render: renderDelegate ?? makeNumericRender(),
align: 'right', align: 'right',
...other ...other