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

fix Slider not emit on-change event when click bar at first time #3291

Merged
merged 2 commits into from
Apr 4, 2018

Conversation

miomio-xiao
Copy link
Contributor

oldValue与currentValue初始化指向相同,直接改变currentValue导致oldValue的值也发生变化。

@icarusion
Copy link
Contributor

Thanks for your pr, could you provide an example of this bug by https://jsfiddle.net/yyrzhm46/ ?

@miomio-xiao
Copy link
Contributor Author

https://jsfiddle.net/yyrzhm46/578/

@icarusion icarusion changed the title fix Slider组件第一次click的时候不触发on-change fix Slider not emit on-change event when click bar at first time Apr 2, 2018
Copy link
Contributor

@SergioCrisostomo SergioCrisostomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miomio-xiao thank you for for finding this bug and suggesting a fix 👍 I think this was a bug I made, sorry!

I think this should be fixed in line 154, with oldValue: [...val],, and no other changes are needed. That is the origin of the problem.

If you could test that and update the PR would be great!

@miomio-xiao
Copy link
Contributor Author

@SergioCrisostomo Thanks for the suggestion, it has been updated.

@icarusion icarusion merged commit 0e6b84f into iview:2.0 Apr 4, 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

Successfully merging this pull request may close these issues.

3 participants