Skip to content

Commit

Permalink
Merge pull request #187 from frappe/nextchamp-saqib-patch-1
Browse files Browse the repository at this point in the history
fix: `data` is undefined
  • Loading branch information
nextchamp-saqib authored Jan 2, 2024
2 parents 98835d8 + b3ff486 commit ae07ce3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/filterRows.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ function getFilterMethod(rows, data, filter) {
let formatter = CellManager.getCustomCellFormatter(cell);
if (data && data.constructor.name === 'DataManager') {
data = data.getData(cell.rowIndex);
} else {
data = rows[cell.rowIndex]
}
if (formatter && cell.content) {
cell.html = formatter(cell.content, rows[cell.rowIndex], cell.column, rows[cell.rowIndex], filter, data);
cell.html = formatter(cell.content, rows[cell.rowIndex], cell.column, data, filter);
return stripHTML(cell.html);
}
return cell.content || '';
Expand Down

0 comments on commit ae07ce3

Please sign in to comment.