Skip to content

Commit

Permalink
fix: store all data and data in separately
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Jan 3, 2024
1 parent 007ec69 commit 4e79211
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/filterRows.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ export default function filterRows(rows, filters, data) {
return filteredRowIndices;
};

function getFilterMethod(rows, data, filter) {
function getFilterMethod(rows, all_data, filter) {
const getFormattedValue = cell => {
let formatter = CellManager.getCustomCellFormatter(cell);
if (data && data.data && data.data.length) {
data = data.data[cell.rowIndex];
} else {
data = rows[cell.rowIndex];
let row_data = rows[cell.rowIndex];
if (all_data && all_data.data && all_data.data.length) {
row_data = all_data.data[cell.rowIndex];
}
if (formatter && cell.content) {
cell.html = formatter(cell.content, rows[cell.rowIndex], cell.column, data, filter);
Expand Down

0 comments on commit 4e79211

Please sign in to comment.