"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
var _baseTableField = _interopRequireDefault(require("./baseTableField"));
var _excluded = ["nextTablePrefix", "value", "onChange", "rules", "name", "renderField", "rowData"];
var CustomField = /*#__PURE__*/function (_BaseTableField) {
  (0, _inheritsLoose2["default"])(CustomField, _BaseTableField);
  function CustomField() {
    return _BaseTableField.apply(this, arguments) || this;
  }
  var _proto = CustomField.prototype;
  _proto.renderField = function renderField() {
    var field = this.field;
    var _this$props = this.props,
      nextTablePrefix = _this$props.nextTablePrefix,
      value = _this$props.value,
      onChange = _this$props.onChange,
      rules = _this$props.rules,
      name = _this$props.name,
      renderField = _this$props.renderField,
      rowData = _this$props.rowData,
      rest = (0, _objectWithoutPropertiesLoose2["default"])(_this$props, _excluded);
    var props = field.init(name, {
      rules: rules
    }, rest);
    delete props.value; // 外部默认为非受控模式

    return renderField(props, value, rowData);
  };
  return CustomField;
}(_baseTableField["default"]);
exports["default"] = CustomField;