Skip to content

Commit

Permalink
fix(utils): Add recently removed export statement (#2764)
Browse files Browse the repository at this point in the history
* fix(utils): Add recently removed export statement

* Add recently removed export statement (via #2738)
* Remove log statements

* Update utils.js
  • Loading branch information
gargroh authored Oct 10, 2020
1 parent 0c805a7 commit a9b57eb
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,32 +247,30 @@ export function flattenBy(arr, key) {
return flat
}

function expandRows(
rows,
{ manualExpandedKey, expanded, expandSubRows = true }
export function expandRows(
rows,
{ manualExpandedKey, expanded, expandSubRows = true }
) {
const expandedRows = [];
const expandedRows = []

const handleRow = (row, addToExpandedRows = true) => {
row.isExpanded =
(row.original && row.original[manualExpandedKey]) || expanded[row.id];
const handleRow = (row, addToExpandedRows = true) => {
row.isExpanded =
(row.original && row.original[manualExpandedKey]) || expanded[row.id]

row.canExpand = row.subRows && !!row.subRows.length;
row.canExpand = row.subRows && !!row.subRows.length

if (addToExpandedRows) {
expandedRows.push(row);
}
if (addToExpandedRows) {
expandedRows.push(row)
}

if (row.subRows && row.subRows.length && row.isExpanded) {
row.subRows.forEach((row) => handleRow(row, expandSubRows));
}
};
if (row.subRows && row.subRows.length && row.isExpanded) {
row.subRows.forEach(row => handleRow(row, expandSubRows))
}
}

rows.forEach((row) => handleRow(row));
rows.forEach(row => handleRow(row))

console.log("foidn");
rows.forEach((row) => console.log("---row", row));
return expandedRows;
return expandedRows
}

export function getFilterMethod(filter, userFilterTypes, filterTypes) {
Expand Down

1 comment on commit a9b57eb

@vercel
Copy link

@vercel vercel bot commented on a9b57eb Oct 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.