@wufengteam/wform
Version:
@wufengteam/wform
39 lines • 1.33 kB
JavaScript
/* eslint-disable no-console */
import React from 'react';
import { Input } from 'antd';
import { prefix } from '../../../utils';
import "./index.css";
var TextArea = function TextArea(props) {
var value = props.value,
_onChange = props.onChange,
onFocusStateChange = props.onFocusStateChange,
placeholder = props.placeholder,
disabled = props.disabled,
allowClear = props.allowClear,
basicStatus = props.basicStatus,
_props$maxLength = props.maxLength,
maxLength = _props$maxLength === void 0 ? 512 : _props$maxLength;
return /*#__PURE__*/React.createElement(React.Fragment, null, basicStatus === 2 ? null : ( /*#__PURE__*/React.createElement(Input.TextArea, {
className: "".concat(prefix, "-editable-table-textArea"),
showCount: true,
value: value,
style: {
marginBottom: '16px'
},
disabled: disabled || basicStatus === 3,
allowClear: allowClear,
maxLength: maxLength,
onChange: function onChange(e) {
var _a;
_onChange((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value);
},
placeholder: placeholder,
onBlur: function onBlur() {
onFocusStateChange('blur');
},
onFocus: function onFocus() {
onFocusStateChange('focus');
}
})));
};
export default TextArea;