@atlaskit/dynamic-table
Version:
A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.
21 lines (20 loc) • 538 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.assertIsSortable = void 0;
var assertIsSortable = exports.assertIsSortable = function assertIsSortable(head) {
if (!head || !head.cells) {
return;
}
head.cells.forEach(function (cell) {
if (cell.isSortable && !cell.key) {
try {
throw Error("isSortable can't be set to true, if the 'key' prop is missing.");
} catch (e) {
// eslint-disable-next-line no-console
console.error(e);
}
}
});
};