rocwang / vue-virtual-scroll-grid

A Vue 3 component that can render a list with 1000+ items as a grid in a performant way.
https://grid.kiwiberry.nz/
MIT License
300 stars 31 forks source link

feat: support `smooth` and `auto` scrollBehavior prop #220

Closed hunterliu1003 closed 2 years ago

hunterliu1003 commented 2 years ago

Provide options smooth, auto for scrollBehavior

In my use case, I'll open a page with dynamic route id, so the url will be like localhost:3000/users/:userId. The page has a Grid component that is for displaying all users on the left side, and displaying current user information on the right side depending on the :userId. So I hope when user refreshing/entering the page, Grid can immediately scroll to the index at the first time instead of smoothly scroll to the index.

That's the reason I need a way to decide when the scrollBehavior is smooth or auto

Please checkout the implementation when you're available, and feel free to let me know if you have better solution thanks.

netlify[bot] commented 2 years ago

Deploy request for vue-virtual-scroll-grid accepted.

Name Link
Latest commit 1f924f677b5f02965a92844bc138f82bd677fd79
Latest deploy log https://app.netlify.com/sites/vue-virtual-scroll-grid/deploys/6295c1285f028b0008ef0bc9
mesqueeb commented 2 years ago

:100::100::100::100::100:

hunterliu1003 commented 2 years ago

Sure! I updated the documentation in README.md. Please check again.

mesqueeb commented 2 years ago

@rocwang let me know if you released this one 🙏🏻

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 1.5.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: