import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
export default function findRowKeys(rows, rowKey, expanded) {
  var keys = [];

  for (var i = 0; i < rows.length; i++) {
    var item = rows[i];

    if (item.children) {
      // @ts-ignore
      keys.push(item[rowKey]);
      keys = [].concat(_toConsumableArray(keys), _toConsumableArray(findRowKeys(item.children, rowKey)));
    } else if (expanded) {
      // @ts-ignore
      keys.push(item[rowKey]);
    }
  }

  return keys;
}
//# sourceMappingURL=findRowKeys.js.map
