zarm icon indicating copy to clipboard operation
zarm copied to clipboard

Tab加了scrollable,跳页面回来或者直接刷新报错Cannot read property 'offsetLeft' of undefined

Open kakalc opened this issue 3 years ago • 4 comments

Description

Explain the issue you met, and describe what you expected to be.

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [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.

kakalc avatar Aug 25 '21 01:08 kakalc

能否用 codesanbox 提供一个demo?

JeromeLin avatar Aug 25 '21 01:08 JeromeLin

我没弄过这个codesanbox, 错误就是这个tab支持滑动的话刷新或跳转再回来就会提示 ===》 无法对卸载的组件执行 React 状态更新。这是一个空操作,但它表明您的应用程序中存在内存泄漏,,scrollable为false就没问题

能否用 codesanbox 提供一个demo?

kakalc avatar Aug 25 '21 06:08 kakalc

@kakalc 你那访问官网的例子有错误么?先排除下是否浏览器兼容性问题。

codesanbox例子,可以到 https://zarm.design/#/components/tabs 这里,点击"在Codesanbox打开",然后修改成你要的代码,保存后,把链接地址发出来

JeromeLin avatar Aug 25 '21 07:08 JeromeLin

very good

linshisancc avatar Jul 07 '22 16:07 linshisancc