UNPKG

@gooddata/react-components

Version:

GoodData.UI - A powerful JavaScript library for building analytical applications

24 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var LoadingComponent_1 = require("../../simple/LoadingComponent"); /** * This component is passed to AG-Grid and will be used to render loading indicator on row-level * * @param props * @constructor */ exports.RowLoadingElement = function (props) { if (props.node.rowPinned === "top") { return React.createElement("span", { className: "gd-sticky-header-value" }, props.formatValue(props.value)); } // rows that are still loading do not have node.id // pinned rows (totals) do not have node.id as well, but we want to render them using the default renderer anyway if (props.node.id !== undefined || props.node.rowPinned === "bottom") { // props.value is always unformatted // there is props.formattedValue, but this is null for row attributes for some reason return React.createElement("span", { className: "s-value s-loading-done" }, props.formatValue(props.value)); } return React.createElement(LoadingComponent_1.LoadingComponent, { width: 36, imageHeight: 8, height: 26, speed: 2 }); }; //# sourceMappingURL=RowLoadingElement.js.map