@progress/kendo-react-grid
Version:
KendoReact Grid package
73 lines • 2.57 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");
// tslint:disable:max-line-length
/**
* Represents the detail row class of the KendoReact Grid. Used to define custom details for each row. Can be applied for building the hierarchy. If `expandField` is set, the details for each row will be visible or hidden depending on the current data item and its `expandField` value.
*
* @example
* ```jsx
* class CustomGridDetailRow extends GridDetailRow {
* render() {
* const detailData = this.props.dataItem.MasterField2;
* return (
* <div>
* This is detail template with another grid inside it
* <Grid scrollable="none" data={detailData} />
* </div>
* );
* }
* }
*
* class App extends React.Component {
* constructor(props) {
* super(props);
* this.state = {
* data: [{MasterField1:'A1', MasterField2: [{DetailField1: 1, DetailField2: 2}]},
* {MasterField1:'B1', MasterField2: [{DetailField1: 3, DetailField2: 4}]},
* {MasterField1:'C1', MasterField2: [{DetailField1: 5, DetailField2: 6}]}]
* };
* }
* render() {
* return (
* <Grid
* data={this.state.data}
* detail={CustomGridDetailRow}
* >
* <GridColumn field="MasterField1" />
* </Grid>
* );
* }
* }
* ReactDOM.render(
* <App />,
* document.querySelector('my-app')
* );
* ```
*/
// tslint:enable:max-line-length
var GridDetailRow = /** @class */ (function (_super) {
__extends(GridDetailRow, _super);
function GridDetailRow() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* @hidden
*/
GridDetailRow.prototype.render = function () {
return null;
};
return GridDetailRow;
}(React.Component));
exports.GridDetailRow = GridDetailRow;
//# sourceMappingURL=GridDetailRow.js.map