UNPKG

@progress/kendo-react-grid

Version:
41 lines 1.8 kB
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 __()); }; })(); import * as React from 'react'; import { guid } from '@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 = 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)); export { GridHeaderSelectionCell }; //# sourceMappingURL=GridHeaderSelectionCell.js.map