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

feat: add onSync callback to resolve #87 #91

Merged
merged 4 commits into from
Jan 30, 2020

Conversation

haoliangwu
Copy link
Contributor

the new behavior

add onSync callback to ScrollBar comp.

why

the reason is that I think it is better to decouple the implementation of how to sync perfect-scroll container by invoking ps.update() with DI pattern. In this way, we don't need to expose several props which stand for some special meaning, eg: debounceUpdate, debounceTime, debounceMaxTime and so on. We pass ps instance to user and let them decide how to sync the container(even not by involing ps.update()).

how to use it

please refer to example.js

Copy link
Owner

@goldenyz goldenyz left a comment

Choose a reason for hiding this comment

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

LGTM, please update as the comments.
It is really kind of you if update the README.md also

@goldenyz goldenyz merged commit 755caea into goldenyz:master Jan 30, 2020
@haoliangwu haoliangwu deleted the add-on-sync-cb branch January 31, 2020 03:42
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.

2 participants