Comments (7)
For anyone looking at this issue when building a "chat" system, one way to get around this is to apply a transformation on the Virtuoso style prop, i.e <Virtuoso style={{rotate(180deg) scaleX(-1)}}>
and then apply the same transformation but on the ItemContainer
too (so the item is reversed back to be readable again).
The scrollbar itself naturally reverses too (works on mac, chrome and firefox), so you'll be starting from the bottom. Furthermore, you'll have to manually invert scrolling. This kind of methodology works well as onEndReached
will get called properly when you scroll to the "top".
The idea was taken from https://facebook.github.io/react-native/docs/flatlist#inverted where they apply a transformation too for their inverted prop.
from react-virtuoso.
@iJimmyWei Thanks for sharing that! I am working on this feature right now (with a timeline / chat UI in mind), should be available in the upcoming weeks.
from react-virtuoso.
@nicgutierrez Yes, I will keep this open to notify you on when it is ready, as I will appreciate feedback on the behavior.
from react-virtuoso.
@ysael @nicgutierrez - v 0.13.1 includes the necessary configuration: https://virtuoso.dev/initial-index/
Check the rest of the new items from the navigation, they might be relevant for your cases. Cheers!
from react-virtuoso.
Hey,
there are 2 probing rendering cycles that are necessary for Vrituoso to determine the probable size of the items. From what you describe, the delay might be related to that. Do you have the whole thing (or part of it) working somewhere? I can take a look.
from react-virtuoso.
Thanks both @iJimmyWei and @petyosi!
@petyosi do you want to keep this open until the release? Otherwise, feel free to close.
Thanks again,
Nic
from react-virtuoso.
Hi from 🇨🇦 and great work @petyosi I was wondering if its possible to do like @iJimmyWei is proposing but avoid that part --> The scrollbar itself naturally reverses too
thanks in advance and hopefully we can start leveraging the lib in our current project 👍
from react-virtuoso.
Related Issues (20)
- Suggestion - add onScrollbarPresenceChange event/callback HOT 1
- [BUG] `TableBody` in components props of `TableVirtuoso` causes rendering issue HOT 1
- [TYPE ERROR]: GridItem is missing some prop types HOT 2
- [BUG] GridVirtuoso with material-ui grid
- [BUG] Prepending docs not there anymore HOT 1
- [BUG] Table scrolls to top when search params change HOT 1
- [BUG] Not unloading no longer visible items HOT 3
- EndReached is not called when the height of the container is greater than the total height of the loaded items
- [BUG] Zero-sized element, this should not happen HOT 3
- [BUG] Flickering of Dynamic Elements When Scrolling Up HOT 1
- Announcement:: Message List Component
- How do I customize/add style to the wrapper <DIV> for Header/Footer in react-virtuoso?
- [BUG] - Possible bug with GroupedVirtuoso initialTopMostItemIndex and resizing items HOT 1
- [BUG] Unable to scroll to absolute bottom if there is a footer with position: sticky HOT 9
- How to specify a row in Virtuoso List so that it does not unload when scrolling HOT 2
- [BUG] `restoreStateFrom` appears to have a race condition when restoring state on component mount HOT 8
- React Virtuoso Message List - ref.current.scrollToItem based on the item.data instead of using the item index?
- [BUG] npm run browse-examples
- [BUG] Simple header breaks restore state location HOT 2
- [BUG] When used in MUI's Tooltip component, extra white space will appear.
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 react-virtuoso.