@progress/kendo-react-grid
Version:
KendoReact Grid package
38 lines • 1.56 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 __());
};
})();
import * as React from 'react';
/**
* The GridColumnMenuItem to be used inside the Grid ColumnMenu.
*/
var GridColumnMenuItem = /** @class */ (function (_super) {
__extends(GridColumnMenuItem, _super);
function GridColumnMenuItem() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.onClick = function (e) {
if (_this.props.onClick) {
_this.props.onClick(e);
}
};
return _this;
}
/**
* @hidden
*/
GridColumnMenuItem.prototype.render = function () {
var _a = this.props, title = _a.title, iconClass = _a.iconClass, selected = _a.selected;
return (React.createElement("div", { onClick: this.onClick, className: "k-columnmenu-item " + (selected ? 'k-state-selected' : '') },
iconClass && React.createElement("span", { className: "k-icon " + iconClass }),
title));
};
return GridColumnMenuItem;
}(React.Component));
export { GridColumnMenuItem };
//# sourceMappingURL=GridColumnMenuItem.js.map