import React from 'react' import { Input, Dropdown, Checkbox, Icon, Menu } from 'antd' class CheckToInput extends React.Component { constructor (props) { super(props) this.state = { visible: false } } SelectCheck = (e, item) => { e.stopPropagation() const value = this.props.value const newValue = [] let isGet = false if (value && value.length) { value.forEach(t => { if (item.value.toString() === t) { isGet = true if (e.target.checked) { newValue.push(t) } } else { newValue.push(t) } }) } if (!isGet && e.target.checked) { newValue.push(item.value.toString()) } if (typeof this.props.onChange === 'function') { this.props.onChange(newValue) } } render () { const { checkedData = [], value, disabled, style, promptInfo } = this.props const selectedLabels = [] if (checkedData && checkedData.length && value && value.length) { checkedData.forEach(t => { if (value.includes(t.value.toString())) { selectedLabels.push(t.label) } }) } const tempValue = selectedLabels && selectedLabels.length ? selectedLabels.join(',') : null const overlayComponent = (
) const dropAfter = (