@wufengteam/wform
Version:
@wufengteam/wform
47 lines (45 loc) • 1.62 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _antd = require("antd");
var _utils = require("../../../utils");
require("./index.css");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/* eslint-disable no-console */
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.default.createElement(_react.default.Fragment, null, basicStatus === 2 ? null : ( /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, {
className: "".concat(_utils.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');
}
})));
};
var _default = exports.default = TextArea;