fix: getdata from datamanager if data is datamanager object

This commit is contained in:
Shariq Ansari 2023-12-21 14:08:12 +05:30
parent 49cc051392
commit b8a1af27d2

View File

@ -33,7 +33,9 @@ export default function filterRows(rows, filters, data) {
function getFilterMethod(rows, data, filter) { function getFilterMethod(rows, data, filter) {
const getFormattedValue = cell => { const getFormattedValue = cell => {
let formatter = CellManager.getCustomCellFormatter(cell); let formatter = CellManager.getCustomCellFormatter(cell);
data = data.getData(cell.rowIndex); if (data && data.constructor.name == "DataManager") {
data = data.getData(cell.rowIndex);
}
if (formatter && cell.content) { 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, rows[cell.rowIndex], filter, data);
return stripHTML(cell.html); return stripHTML(cell.html);