import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
var _excluded = ["nextTablePrefix", "value", "onChange", "rules", "name", "renderField", "rowData"];
import BaseTableField from "./baseTableField";
var CustomField = /*#__PURE__*/function (_BaseTableField) {
  _inheritsLoose(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 = _objectWithoutPropertiesLoose(_this$props, _excluded);
    var props = field.init(name, {
      rules: rules
    }, rest);
    delete props.value; // 外部默认为非受控模式

    return renderField(props, value, rowData);
  };
  return CustomField;
}(BaseTableField);
export { CustomField as default };