• Find the cell index containing the target html element. This function traces up the DOM hierarchy to find the root cell node. Then find the corresponding child and select it.

    Parameters

    • node: HTMLElement

      the cell node or a child of the cell node.

    • cells: Iterable<Cell<ICellModel>>

      an iterable of Cells

    • isCellNode: ((node) => boolean)

      a function that takes in a node and checks if it is a cell node.

        • (node): boolean
        • Parameters

          Returns boolean

    Returns number

    index of the cell we're looking for. Returns -1 if the cell is not founds