import React from 'react'; import { Form, Select } from 'antd'; const { Option } = Select; class IceSelect extends React.Component { constructor(props) { super(props); this.onChange = props.onChange; } render() { let options; const { field, adapter } = this.props; let { value } = this.props; const data = field[1]; if (data['remote-source'] != null) { let key = `${data['remote-source'][0]}_${data['remote-source'][1]}_${data['remote-source'][2]}`; if (data['remote-source'].length === 4) { key = `${key}_${data['remote-source'][3]}`; } options = adapter.fieldMasterData[key]; } else { options = data.source; } const optionData = this.getFormSelectOptionsRemote(options, field, adapter); // value should be an array if multi-select if (data.type === 'select2multi') { try { value = JSON.parse(value); if (value == null) { value = []; } value = value.map((item) => `${item}`); } catch (e) { value = []; } } return (