zarm
zarm copied to clipboard
Tab加了scrollable,跳页面回来或者直接刷新报错Cannot read property 'offsetLeft' of undefined
Description
Explain the issue you met, and describe what you expected to be.
Steps to Reproduce
- [First Step]
- [Second Step]
- [and so on...]
Error Trace (if possible)
It's better to post up the error stack for us to trace this issue.
Solution
What needs to be done to address this issue? Ideally, provide a pull request with a fix.
Environment
- zarm version
- react/react-native version
- system version
- browser version
You can get this information from package.json
and your device.
能否用 codesanbox 提供一个demo?
我没弄过这个codesanbox, 错误就是这个tab支持滑动的话刷新或跳转再回来就会提示 ===》 无法对卸载的组件执行 React 状态更新。这是一个空操作,但它表明您的应用程序中存在内存泄漏,,scrollable为false就没问题
能否用 codesanbox 提供一个demo?
@kakalc 你那访问官网的例子有错误么?先排除下是否浏览器兼容性问题。
codesanbox例子,可以到 https://zarm.design/#/components/tabs 这里,点击"在Codesanbox打开",然后修改成你要的代码,保存后,把链接地址发出来
very good