forked from ddrilling/asb_cloud_front
key заменено на value
This commit is contained in:
parent
7a3d26e846
commit
58cc1dc714
@ -209,7 +209,7 @@ export const makeSelectColumn = <T extends unknown = string>(
|
||||
other?: columnPropsOther
|
||||
) => makeColumn(title, dataIndex, {
|
||||
input: <Select options={options}/>,
|
||||
render: (key) => options.find(option => option?.key === key)?.label ?? defaultValue ?? '--',
|
||||
render: (value) => options.find(option => option?.value === value)?.label ?? defaultValue ?? '--',
|
||||
...other
|
||||
})
|
||||
|
||||
|
@ -40,7 +40,7 @@ export const ClusterController = () => {
|
||||
useEffect(() => invokeWebApiWrapperAsync(
|
||||
async () => {
|
||||
let deposits = await DepositService.getDeposits()
|
||||
deposits = deposits?.map((deposit) => ({ key: deposit.id, label: deposit.caption }))
|
||||
deposits = deposits?.map((deposit) => ({ value: deposit.id, label: deposit.caption }))
|
||||
setDeposits(deposits ?? [])
|
||||
},
|
||||
setShowLoader,
|
||||
|
@ -55,7 +55,7 @@ export const UserController = () => {
|
||||
useEffect(() => invokeWebApiWrapperAsync(
|
||||
async () => {
|
||||
let companies = await AdminCompanyService.getPage(0, maxCompaniesCount)
|
||||
companies = companies?.map((company) => ({ key: company.id, label: company.caption }))
|
||||
companies = companies?.map((company) => ({ value: company.id, label: company.caption }))
|
||||
setCompanies(companies?.items ?? [])
|
||||
},
|
||||
setShowLoader,
|
||||
|
@ -40,7 +40,7 @@ export const WellController = () => {
|
||||
useEffect(() => invokeWebApiWrapperAsync(
|
||||
async () => {
|
||||
let clusters = await ClusterService.getClusters()
|
||||
clusters = clusters?.map((cluster) => ({ key: cluster.id, label: cluster.caption }))
|
||||
clusters = clusters?.map((cluster) => ({ value: cluster.id, label: cluster.caption }))
|
||||
setClusters(clusters ?? [])
|
||||
},
|
||||
setShowLoader,
|
||||
|
Loading…
Reference in New Issue
Block a user