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(useScroll): add support for row-reverse and column-reverse #2577

Merged
merged 8 commits into from Apr 13, 2023

Conversation

OneLoneFox
Copy link
Contributor

Description

Fixes #2576

also fixes incorrect calculation of directions.right mentioned in the same issue


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • [] Ideally, include relevant tests that fail without this PR but pass with it.

@OneLoneFox
Copy link
Contributor Author

Is there anything stopping this from being reviewed?

@antfu antfu merged commit 23b9a34 into vueuse:main Apr 13, 2023
3 checks passed
@jonmes
Copy link

jonmes commented May 22, 2023

how is this issue resolved?
is there any one who can give me some demo on how reverse column works in infiniteScroll

@OneLoneFox
Copy link
Contributor Author

how is this issue resolved? is there any one who can give me some demo on how reverse column works in infiniteScroll

It works exactly the same as a normal column, the only difference being that the scrolling element has flex-direction: column-reverse;, the issue linked to this PR has a repro.

The bug was fixed by essentially flipping the way top and bottom are calculated since js treat reverse rows and columns as a negative version of the normal ones. You can review the commits yourself.

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.

[useScroll] flex column-reverse and row-reverse
3 participants