@progress/kendo-react-grid
Version:
KendoReact Grid package
44 lines • 2.02 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var utils_1 = require("../utils");
/**
* The component for each of the items in the `data` property which the Grid renders.
*/
var GridRow = /** @class */ (function (_super) {
__extends(GridRow, _super);
function GridRow() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* @hidden
*/
GridRow.prototype.render = function () {
var className = (this.props.rowType === 'groupFooter' || this.props.rowType === 'groupHeader') ?
(this.props.rowType === 'groupFooter' && 'k-group-footer' || 'k-grouping-row') :
(this.props.isAltRow ? 'k-master-row k-alt' : 'k-master-row') +
(this.props.selectedField !== undefined &&
utils_1.getNestedValue(this.props.selectedField, this.props.dataItem) ?
' k-state-selected' : '');
var defaultRendering = (React.createElement("tr", { onClick: this.props.onClick, className: className, style: {
height: this.props.rowHeight ? this.props.rowHeight + 'px' : '',
visibility: this.props.isHidden ? 'hidden' : ''
} }, this.props.children));
return this.props.render ?
this.props.render.call(undefined, defaultRendering, this.props) :
defaultRendering;
};
return GridRow;
}(React.Component));
exports.GridRow = GridRow;
//# sourceMappingURL=GridRow.js.map