Expose row data to table widget column popover (#2501)

This commit is contained in:
Arpit 2022-03-14 14:59:29 +05:30 committed by GitHub
parent 4bfc2c7c1c
commit 966428095b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -352,12 +352,13 @@ export function Table({
Cell: function (cell) {
const rowChangeSet = changeSet ? changeSet[cell.row.index] : null;
const cellValue = rowChangeSet ? rowChangeSet[column.name] || cell.value : cell.value;
const rowData = tableData[cell.row.index];
switch (columnType) {
case 'string':
case undefined:
case 'default': {
const textColor = resolveReferences(column.textColor, currentState, '', { cellValue });
const textColor = resolveReferences(column.textColor, currentState, '', { cellValue, rowData });
const cellStyles = {
color: textColor ?? '',