fix: offsetHeight null error (#259)
remove findDOMNode and used element instead
issue to fix https://github.com/react-component/virtual-list/issues/259
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| virtual-list | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 3, 2024 7:11am |
这个问题修复了吗?在哪个版本?
这个问题修复了吗?在哪个版本?
没有,希望先给个复现找找问题是什么
ReactDOM.findDOMNode 不是在React 17中已经弃用了吗
我这里是用qiankun嵌入到主应用之后,子应用所有涉及到select下拉的地方都报错
我把rc-util的findDOMNode修改直接返回node 也能解决这个问题,代码能否做兼容
我们希望能看看原始问题是什么,你截图的废弃方法只是一个兜底行为。
我们希望能看看原始问题是什么,你截图的废弃方法只是一个兜底行为。
这个问题我们排查出来了,复现仓库提供有点困难。出现的原因是使用了wangeditor且添加了wangeditor的公式插件@wangeditor/plugin-formula,就是这个公式插件导致的问题,并且单独打开子应用访问的时候没有报错,通过qiankun嵌入到主应用后会报错。
没有复现就没办法看具体原因是什么了,这个 PR 本身是不解决问题的。如果元素非有效 ele 就会导致收集高度失败而无法滚动。
@zombieJ hello sorry for late reply here is a reproductable demo of our case https://stackblitz.com/edit/vitejs-vite-cguoy3?file=src%2FApp.tsx
to work please update the iframe URL to current url of page in stackblitz (page should be opened in new tab)
video with steps https://jmp.sh/bkYSU56w
@zombieJ hello sorry for late reply here is a reproductable demo of our case https://stackblitz.com/edit/vitejs-vite-cguoy3?file=src%2FApp.tsx
I don't see this error in the console
@zombieJ hello sorry for late reply here is a reproductable demo of our case https://stackblitz.com/edit/vitejs-vite-cguoy3?file=src%2FApp.tsx
I don't see this error in the console
@yoyo837 @zombieJ i updated comment with needed steps to appear need to update iframe URL and open in new tab
@yoyo837 are you changed the iframe URL ? if yes try and to open in new tab
@yoyo837 are you changed the iframe URL ?
Now, the new screenshots, yes, I changed it.
Oh, I saw it now.
Oh, I saw it now.
@yoyo837 sorry ,but can you please confirm you can reproduce the error or need to make some changes in demo ?
Oh, I saw it now.
@yoyo837 sorry ,but can you please confirm you can reproduce the error or need to make some changes in demo ?
Yes, The operation to reproduce the problem is more complicated, but it is much better than not being able to reproduce it.
Thanks for your reproduce. It seems rc-util isDOM function not working with iframe element check which is not rc-virtual-list bug:
ref https://github.com/react-component/util/blob/master/src/Dom/findDOMNode.ts#L4
Thanks for your reproduce. It seems
rc-utilisDOMfunction not working with iframe element check which is notrc-virtual-listbug:ref https://github.com/react-component/util/blob/master/src/Dom/findDOMNode.ts#L4
@lift46252, do you have interested to handle this?
Thanks for your reproduce. It seems
rc-utilisDOMfunction not working with iframe element check which is notrc-virtual-listbug: ref https://github.com/react-component/util/blob/master/src/Dom/findDOMNode.ts#L4@lift46252, do you have interested to handle this?
@zombieJ yes i will try but this will take some time
