react-infinite-table
Version:
React table with infinite rows and much more!
58 lines (47 loc) • 2.24 kB
JavaScript
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
import React from 'react';
import PropTypes from 'prop-types';
var Cell = /*#__PURE__*/function (_React$Component) {
_inherits(Cell, _React$Component);
var _super = _createSuper(Cell);
function Cell() {
_classCallCheck(this, Cell);
return _super.apply(this, arguments);
}
_createClass(Cell, [{
key: "render",
value: function render() {
var _this$props = this.props,
renderer = _this$props.renderer,
columnIndex = _this$props.columnIndex,
column = _this$props.column,
rowIndex = _this$props.rowIndex,
rowData = _this$props.rowData,
className = _this$props.className;
return renderer({
columnIndex: columnIndex,
column: column,
rowIndex: rowIndex,
rowData: rowData,
className: className
});
}
}]);
return Cell;
}(React.Component);
_defineProperty(Cell, "propTypes", {
renderer: PropTypes.func.isRequired,
columnIndex: PropTypes.number,
column: PropTypes.object,
rowIndex: PropTypes.number,
rowData: PropTypes.object,
className: PropTypes.string
});
export { Cell as default };