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

this.cache 只在 didMount 时记录一次,导致参数变化时 cache 的数据不对 #121

Closed
eternalsky opened this issue May 16, 2018 · 4 comments

Comments

@eternalsky
Copy link

https://github.com/react-component/tabs/blob/master/src/SwipeableTabBarMixin.js#L97

如上,如果参数变化,比如 pageSize 或者 children 的数量发生变化,totalAvaliableDelta,tabWidth 这些参数都不会随之变化,造成新增加的 tab 不能 swipe 出来。

@LiangZugeng
Copy link

这个问题有Ant Design团队的人看一下吗?已经9天了。

yesmeck added a commit that referenced this issue Jun 27, 2018
@yesmeck
Copy link
Member

yesmeck commented Jun 27, 2018

salt-ui/saltui#178 就像引用的那个 issue 里一样,如果动态修改了 tabitem 的个数,比如从 11 个 变到 15 个,这样新增的 4 个,就划不出来

@LiangZugeng
Copy link

@yesmeck 看到你提交了一个commit,也就是说这个问题在在React-Component的tabs控件上已经修复了,那 @eternalsky 他们只需要引用最新的tabs控件就行了,对吧?

@yesmeck
Copy link
Member

yesmeck commented Jun 27, 2018

@LiangZugeng 还没发布,我验证下。

yesmeck added a commit that referenced this issue Jun 27, 2018
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

3 participants