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

Tabs 使用了scrollable之后,使用value报错 #503

Closed
qianshuideyu opened this issue Oct 19, 2020 · 4 comments
Closed

Tabs 使用了scrollable之后,使用value报错 #503

qianshuideyu opened this issue Oct 19, 2020 · 4 comments
Assignees
Labels
💡 feature 功能需求

Comments

@qianshuideyu
Copy link

Description

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

Steps to Reproduce

  1. Tabs遍历出Panel
  2. Tabs使用scrollable属性
  3. 使用value,报错

Error Trace (if possible)

Tabs.js:324 Uncaught TypeError: Cannot read property 'offsetLeft' of undefined

@Yang03
Copy link
Contributor

Yang03 commented Oct 20, 2020

@qianshuideyu 麻烦提供下你使用的zarm版本信息,如果有示例代码就更好了

@qianshuideyu
Copy link
Author

qianshuideyu commented Oct 20, 2020

最开始我的zarm的版本是2.5.3,但是我尝试更新版本到2.5.6也依然没有解决这个问题。

即使这样写都会报错。
示例代码
报错信息如下:
错误信息

@JeromeLin
Copy link
Collaborator

@qianshuideyu https://codesandbox.io/s/withered-water-6ng97?file=/src/App.js 似乎并没有你说的问题,可能是你项目环境其他库引起,可以用codesanbox 提供一下最小的例子,以便我们定位问题所在

@Yang03
Copy link
Contributor

Yang03 commented Oct 21, 2020

@qianshuideyu 应该是你的value 值大于了tabs  的 length

@JeromeLin JeromeLin added the 💡 feature 功能需求 label Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 feature 功能需求
Projects
None yet
Development

No branches or pull requests

3 participants