fixed-react-data-grid-custom
Version:
Excel-like grid component built with React, with editors, keyboard navigation, copy & paste, and the like
19 lines • 632 B
JavaScript
export function get(row, property) {
if (typeof row.get === 'function') {
return row.get(property);
}
return row[property];
}
export function isRowSelected(keys, indexes, isSelectedKey, rowData, rowIdx) {
if (Array.isArray(indexes) && typeof rowIdx === 'number') {
return indexes.includes(rowIdx);
}
if (rowData && keys && keys.rowKey && Array.isArray(keys.values)) {
return keys.values.includes(rowData[keys.rowKey]);
}
if (rowData && typeof isSelectedKey === 'string') {
return !!rowData[isSelectedKey];
}
return false;
}
//# sourceMappingURL=RowUtils.js.map