UNPKG

@progress/kendo-react-grid

Version:
43 lines 1.93 kB
"use strict"; 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 kendo_react_common_1 = require("@progress/kendo-react-common"); /** * @hidden */ var GridHeaderSelectionCell = /** @class */ (function (_super) { __extends(GridHeaderSelectionCell, _super); function GridHeaderSelectionCell() { var _this = _super !== null && _super.apply(this, arguments) || this; _this._inputId = kendo_react_common_1.guid(); return _this; } GridHeaderSelectionCell.prototype.render = function () { var _this = this; var defaultRendering = [ (React.createElement("input", { key: 0, checked: this.props.selectionValue, id: this._inputId, type: "checkbox", className: "k-checkbox", onChange: function (e) { return _this.props.selectionChange({ field: _this.props.field, syntheticEvent: e }); } })), (React.createElement("label", { key: 1, className: "k-checkbox-label", htmlFor: this._inputId })) ]; return this.props.render ? this.props.render.call(undefined, defaultRendering, this.props) : defaultRendering; }; return GridHeaderSelectionCell; }(React.Component)); exports.GridHeaderSelectionCell = GridHeaderSelectionCell; //# sourceMappingURL=GridHeaderSelectionCell.js.map