UNPKG

@progress/kendo-react-grid

Version:
59 lines 2.31 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 ColumnDraggable = /** @class */ (function (_super) { __extends(ColumnDraggable, _super); function ColumnDraggable() { var _this = _super !== null && _super.apply(this, arguments) || this; /** * @hidden */ _this.onPress = function (data) { var element = _this.draggable && _this.draggable.element; if (element && _this.props.pressHandler) { _this.props.pressHandler(data.event, element); } }; /** * @hidden */ _this.onDrag = function (data) { var element = _this.draggable && _this.draggable.element; if (element && _this.props.dragHandler) { _this.props.dragHandler(data.event, element); } }; /** * @hidden */ _this.onRelease = function (data) { var element = _this.draggable && _this.draggable.element; if (element && _this.props.releaseHandler) { _this.props.releaseHandler(data.event); } }; return _this; } ColumnDraggable.prototype.render = function () { var _this = this; return (React.createElement(kendo_react_common_1.Draggable, { onPress: this.onPress, onDrag: this.onDrag, onRelease: this.onRelease, ref: function (component) { _this.draggable = component; } }, React.createElement("tr", null, this.props.children))); }; return ColumnDraggable; }(React.PureComponent)); exports.ColumnDraggable = ColumnDraggable; //# sourceMappingURL=ColumnDraggable.js.map