forked from ddrilling/asb_cloud_front
24 lines
443 B
TypeScript
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>
|
|
}
|