Comments (6)
Is this what you want to achieve?
https://codesandbox.io/s/react-fiddle-forked-h8fvx?file=/src/App.js
BTW. there are functions that you can call on the Scrollbars instance (that you can get a hold of using refs):
scrollToTop
scrollToBottom
scrollToRight
scrollToLeft
from rc-scrollbars.
i dont need only to btm, some times i need to go not to the last element
i want to use scrollIntoView with options {block: 'center} but if im using it i got dat
for me is hard to use scrollToTop cuz my content height inside this scroll are dynamic
from rc-scrollbars.
You can scroll into any position you like with Scrollbars.scrollTop(placeYouWantToScrollInto). See the Spring Scrollbars example that also uses rebound for a smoother effect.
The options you wanted to use are experimental anyway and should not be used.
from rc-scrollbars.
but you know easy way to get item's position inside scroll? I only know basic: item.height*x, but i have dynamic height on items, so its hard for me to calc all items (i know it possible, but easiest way to use just scrollIntoView)
from rc-scrollbars.
Element.offsettop would be my first call. Anyway it's more like stackoverflow question than Scrollbars related.
As described above, you are encouraged to use the API to scroll within it rather than using scrollInto etc. browser API.
Otherwise you may see such artifacts as the original scrollbars being pulled from under the negative margins.
Unless you have any more issues to raise, I assume your case to be closed?
from rc-scrollbars.
yes, thanks for help
from rc-scrollbars.
Related Issues (20)
- When zooming out, the default scroolbar is shown HOT 5
- [v1.1.0]: React does not recognize the `disableDefaultStyles` prop on a DOM element HOT 3
- State of former PR's
- RTL HOT 3
- V[1.1.1] window is not defined - NextJs HOT 3
- Adding an id to the containing div HOT 14
- Scrollbars not visible when disabling native ones HOT 9
- Auto hide with hover mode HOT 17
- Render content from the bottom HOT 2
- Add custom event handlers for components?
- Example with horizontal scrolling table (if possible)
- RC Scrollbars hidding Chraka's Popover
- Unable to wheel on scrollbars
- Possible to style actual scrollbar mover? HOT 1
- Unable show Scrollbar On Google Chrome(and Safari) which does not display scroll bars by default HOT 1
- How to disable horizontal scroll HOT 4
- ESM support
- Scrollbars not appearing/disappearing when internal elements height changes HOT 2
- Trying to figure out the types for the style object in 'renderThumbVertical' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rc-scrollbars.