@progress/kendo-react-grid
Version:
KendoReact Grid package
61 lines • 2.13 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");
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
var messages_1 = require("./messages");
// tslint:disable:max-line-length
/**
* Represents the GridNoRecords component. The component is rendered when the `data` property of the Grid is empty or `null`.
*
* @example
* ```jsx
* class App extends React.Component {
* render() {
* return (
* <Grid data={[]}>
* <GridNoRecords>
* There is no data available
* </GridNoRecords>
* <GridColumn field="id" />
* <GridColumn field="name" />
* </Grid>
* );
* }
* }
* ReactDOM.render(
* <App />,
* document.querySelector('my-app')
* );
* ```
*/
// tslint:enable:max-line-length
var GridNoRecords = /** @class */ (function (_super) {
__extends(GridNoRecords, _super);
function GridNoRecords() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* @hidden
*/
GridNoRecords.prototype.render = function () {
return this.props.children || kendo_react_intl_1.provideLocalizationService(this).toLanguageString(messages_1.noRecords, messages_1.messages[messages_1.noRecords]);
};
/**
* @hidden
*/
GridNoRecords.displayName = 'KendoReactGridNoRecords';
return GridNoRecords;
}(React.Component));
exports.GridNoRecords = GridNoRecords;
kendo_react_intl_1.registerForLocalization(GridNoRecords);
//# sourceMappingURL=GridNoRecords.js.map