Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

文本节点通过observe监听报类型错误 #144

Open
myh1999 opened this issue Dec 5, 2022 · 0 comments
Open

文本节点通过observe监听报类型错误 #144

myh1999 opened this issue Dec 5, 2022 · 0 comments

Comments

@myh1999
Copy link

myh1999 commented Dec 5, 2022

<ResizeObserver onResize={onResize} disabled={disabled}>
          <Wrapper>
            11
            <textarea ref={textareaRef} placeholder="I'm a textarea!" />
          </Wrapper>
</ResizeObserver>

如果传入文本节点 通过findDOMNode获取到的是nodeType为3的节点,通过调用observe(currentElement, onInternalResize); 传入类型不匹配导致报错,还有就是如果传入() => <div>11</div> 函数渲染的话,通过findDOMNode找不到被监听的函数

我从antd里的Affix中发现的问题 最后定位到这了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant