UNPKG

@atlaskit/dynamic-table

Version:

A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.

16 lines 416 B
export var validateSortKey = function validateSortKey(sortKey, head) { if (!sortKey) { return; } var headHasKey = head && head.cells.map(function (cell) { return cell.key; }).includes(sortKey); if (!headHasKey) { try { throw Error("Cell with ".concat(sortKey, " key not found in head.")); } catch (e) { // eslint-disable-next-line no-console console.error(e); } } };