"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = findAllParents;

function findAllParents(rowData, rowKey) {
  var parents = [];

  if (!rowData) {
    return parents;
  }

  function findParent(data) {
    if (data) {
      // @ts-ignore
      parents.push(data[rowKey]);

      if (data._parent) {
        findParent(data._parent);
      }
    }
  }

  findParent(rowData._parent);
  return parents;
}
//# sourceMappingURL=findAllParents.js.map
