You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/main/src/components/AnalyticalTable/AnalyticalTable.mdx
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -454,19 +454,33 @@ const COLUMNS = [
454
454
455
455
### How to change the content of the pop-in cell?
456
456
457
-
You can change the content of the pop-in cell without mutating the original cell by using the `isPopIn` prop of the table instance returned by the `Cell` column option:
457
+
You can change the content of the pop-in cell without mutating the original cell by using the `isPopIn` prop of the table instance returned by the `Cell` column option.
458
+
459
+
**Note:** The `cell` property of the custom `Cell` renderer, always returns the properties and values of the cell the "popin" cell is rendered into.
458
460
459
461
```js
460
462
constCOLUMNS= [
463
+
{
464
+
Header:'Name',
465
+
accessor:'name'
466
+
},
461
467
{
462
468
responsivePopIn:true,
463
469
responsiveMinWidth:600,
464
470
id:'col',
465
471
Header:'Column',
466
-
Cell: ({ isPopIn }) => {
472
+
Cell: ({ isPopIn, cell, value }) => {
467
473
if (isPopIn) {
474
+
// this will log the properties of the `name` cell (e.g. `cell.value` is the value of the `name` cell)
475
+
console.log(cell);
476
+
// this will always log the value of this cell (`col` cell)
477
+
console.log(value);
468
478
return'pop-in content';
469
479
}
480
+
// this will log the properties of this cell (e.g. `cell.value` is the value of the `col` cell)
481
+
console.log(cell);
482
+
// this will always log the value of this cell (`col` cell)
0 commit comments