Skip to content

Commit a9b57eb

Browse files
authored
fix(utils): Add recently removed export statement (#2764)
* fix(utils): Add recently removed export statement * Add recently removed export statement (via #2738) * Remove log statements * Update utils.js
1 parent 0c805a7 commit a9b57eb

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

src/utils.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -247,32 +247,30 @@ export function flattenBy(arr, key) {
247247
return flat
248248
}
249249

250-
function expandRows(
251-
rows,
252-
{ manualExpandedKey, expanded, expandSubRows = true }
250+
export function expandRows(
251+
rows,
252+
{ manualExpandedKey, expanded, expandSubRows = true }
253253
) {
254-
const expandedRows = [];
254+
const expandedRows = []
255255

256-
const handleRow = (row, addToExpandedRows = true) => {
257-
row.isExpanded =
258-
(row.original && row.original[manualExpandedKey]) || expanded[row.id];
256+
const handleRow = (row, addToExpandedRows = true) => {
257+
row.isExpanded =
258+
(row.original && row.original[manualExpandedKey]) || expanded[row.id]
259259

260-
row.canExpand = row.subRows && !!row.subRows.length;
260+
row.canExpand = row.subRows && !!row.subRows.length
261261

262-
if (addToExpandedRows) {
263-
expandedRows.push(row);
264-
}
262+
if (addToExpandedRows) {
263+
expandedRows.push(row)
264+
}
265265

266-
if (row.subRows && row.subRows.length && row.isExpanded) {
267-
row.subRows.forEach((row) => handleRow(row, expandSubRows));
268-
}
269-
};
266+
if (row.subRows && row.subRows.length && row.isExpanded) {
267+
row.subRows.forEach(row => handleRow(row, expandSubRows))
268+
}
269+
}
270270

271-
rows.forEach((row) => handleRow(row));
271+
rows.forEach(row => handleRow(row))
272272

273-
console.log("foidn");
274-
rows.forEach((row) => console.log("---row", row));
275-
return expandedRows;
273+
return expandedRows
276274
}
277275

278276
export function getFilterMethod(filter, userFilterTypes, filterTypes) {

0 commit comments

Comments
 (0)