Skip to content

Commit

Permalink
fix: resolve undefined issue with cell.getValue by using cell?.row.or…
Browse files Browse the repository at this point in the history
…iginal[cell.column?.id]
  • Loading branch information
stone-lyl committed Feb 18, 2025
1 parent 512e5b7 commit d567273
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ui/src/components/Node/table/CellsMatrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ export class CellsMatrix {
const headerText = columnCells[0]?.cell.column.id || '';

const maxLength = columnCells.reduce((max, { cell }) => {
const contentLength = String(cell.getValue() ?? '').length;
const originalContent = cell?.row.original[cell.column?.id] ?? cell.getValue();
const contentLength = String(originalContent).length;
return Math.max(max, contentLength);
}, headerText.length);

Expand Down

0 comments on commit d567273

Please sign in to comment.