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

[bug] Range value改变有时不触发reRender #952

Closed
jsonz1993 opened this issue Feb 20, 2020 · 4 comments
Closed

[bug] Range value改变有时不触发reRender #952

jsonz1993 opened this issue Feb 20, 2020 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jsonz1993
Copy link
Contributor

VERSION:

taro: v2.0.3
taro-ui:2.2.4

Range组件有时候改变value属性不触发reRender,原因是Range组件这里判断有问题/components/range/index.tsx#L96

const [value, update] =  useState([0,50])

setTimeout(() => update([0,30]), 1000)

<AtRange value={value} />
@taro-ui-bot
Copy link

taro-ui-bot bot commented Feb 20, 2020

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@Garfield550
Copy link
Collaborator

我测试了 Class 组件和 Hooks 写法,都没有复现。

你可以 Clone 一下这个仓库试一下 https://github.com/Garfield550/test-taro-ui-range

@taro-ui-bot
Copy link

taro-ui-bot bot commented Feb 25, 2020

Hello~

您的问题我们无法复现。如果有空的话还请拔冗提供一个简单的复现 demo,否则这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@jsonz1993
Copy link
Contributor Author

提了个pr 你看下,点击按钮,只有Text变了,Range没变
https://github.com/Garfield550/test-taro-ui-range/pull/1

@Garfield550 Garfield550 added bug Something isn't working and removed to be closed 需要复现 labels Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants