import React from 'react'; import { Input } from 'antd'; import styles from './styles.less'; import { antiAssign } from '../../../../utils/utils'; import { ApolloTextAreaProps } from '../editInterface'; import { Consumer } from '../../../context'; export const ApolloTextArea = (props: ApolloTextAreaProps) => { const { maxLength, onChange, value } = props; const selfProps = antiAssign(props, ['columnConfig', 'onChange']); const changeValue = (e) => { if (typeof onChange === 'function') { onChange(e.target.value); } }; return ( {({ locale }) => { return (
{!!maxLength && ( {`${locale.alreadyInput} ${ (value || '').length }/${maxLength}`} )}
); }}
); };