asb_cloud_front/src/components/Table/SelectFromDictionary.tsx
2021-08-20 12:31:24 +05:00

24 lines
443 B
TypeScript

import {Select} from 'antd'
const { Option } = Select
interface StandardComponentProps {
dictionary: Map<any, any>,
}
export const SelectFromDictionary = ({dictionary, ...other}: StandardComponentProps) =>{
const options: any[] = []
dictionary.forEach((value, key) => {
options.push(
<Option
key={key}
value={key}>
{value}
</Option>)
})
return <Select {...other}>
{options}
</Select>
}