terra-clinical-data-grid
Version:
An organizational component that renders a collection of data in a grid-like format.
42 lines (41 loc) • 1.93 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _cellDataShape = _interopRequireDefault(require("./cellDataShape"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var rowDataShape = _propTypes.default.shape({
/**
* An identifier for the row. This identifier should be unique across the set of rows provided to a given section.
*/
id: _propTypes.default.string.isRequired,
/**
* A string identifier used to describe the row contents. This value will be used to construct additional labels
* for internal controls (e.g. row selection cells).
*/
ariaLabel: _propTypes.default.string,
/**
* A boolean to prevent the row from being interactive (selectable + selected), hides the column highlighting style in the row when `columnHighlightId` is valued,
* and applies role="presentation" and aria-hidden="true" to hide from screen readers. Used for decorative rows like custom dividers.
*/
isDecorative: _propTypes.default.bool,
/**
* A boolean indicating whether or not the row is selectable.
*/
isSelectable: _propTypes.default.bool,
/**
* A boolean indicating whether or not the row should render as selected.
*/
isSelected: _propTypes.default.bool,
/**
* An array of cell objects that define the content to be rendered in the row. The order in which the cells are rendered is determined by the order of the `pinnedColumns` and `overflowColumns` props.
*/
cells: _propTypes.default.arrayOf(_cellDataShape.default),
/**
* The height for this row. This overrides the `DataGrid` `rowHeight` property. Values are suggested to be in `rem`s (ex `'5rem'`), but any valid CSS height value is accepted.
*/
height: _propTypes.default.string
});
var _default = exports.default = rowDataShape;