Skip to content

When using dom-scroll-into view with rc-tree component, it say var doc = elem.ownerDocument is not defined. #5

@yadavsunil00001

Description

@yadavsunil00001

i am trying to use this wrapper for rc-tree but it saying elem.ownerDocument is not defined.
`

            <div id="container">
            <Tree id="ex1"
              selectable={true}
              multiple={true}
              checkable={true}
              onCheck={this.onCheck}
              checkedKeys={this.state.checkedKeys}
              loadData={this.onLoadData}
              showLine={true}
              showIcon={false}
              checkStrictly={true}
              onExpand={this.onExpand}
              expandedKeys={this.state.Expanded}
              selectedKeys={this.state.Selected}
            >
              {treeNodes}
            </Tree >
            </div>

`

My function to scroll look like this.

scrollIntoView($('#ex1')[0], $('#container')[0], {

})

How to solve the problem.

Please suggest if there is alternative way to do this.

The roor look like this

var box = undefined;
 11 | var x = undefined;
 12 | var y = undefined;
> 13 | var doc = elem.ownerDocument;
 14 | var body = doc.body;
 15 | var docElem = doc && doc.documentElement;
 16 | // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions