Comments (9)
The Virtuoso component does not anticipate a sticky footer element. I see that you're building a chat interface. I strongly recommend you use the VirtuosoMessageList for that purpose - it solves quite a few specifics of the chat interface, including a dedicated sticky footer component.
from react-virtuoso.
I see, thanks for the reply, VirtuosoMessageList
will solve the issues I face above?
is there a monthly subscription pricing instead of a full year subscription? the pricing seems little expensive
from react-virtuoso.
Yes, the scrolling API of the message list takes into account the sizing of the sticky elements.
The pricing is yearly based. A monthly subscription does not make sense for that kind of offering.
from react-virtuoso.
why is it that in Virtuoso Message List
the message data
is stored in a ref
instead of a reactState
? this seems to make it more difficult to manage, unlike Virtuoso
which I can just modify (add /remove) from the state
array directly
from react-virtuoso.
This section of the docs explains it.
In the case of the message list, an updated data prop may have different underlying reasons - new incoming messages, older messages being loaded, or existing messages being updated (for example, someone liked a message). Reverse-engineering the intent from the data set is not always possible, and it's not always clear how the scroll position should be adjusted. The imperative API gives you the necessary control over the scroll position adjustment that the current data set change should cause.
from react-virtuoso.
Then what should I do with the <VirtuosoMessageList />
initialData={}
when I clicked the load More
button to load older messages? prepend()
to the ref
? append
to the ref
? does the ref even hold the initialData
anymore? or do I manually prepend
/ append
to it?
are prepend
and append
the only options? cant I just do something like:
ref.current?.data = messages
?
previously all I need to do is just:
setMessages([...response_messages, ...messages]);
in the fetchMessages()
async axios
call
from react-virtuoso.
Follow the tutorial. It covers exactly this - the initial load data and several additional common scenarios.
from react-virtuoso.
the complete live example do not even show the complete code, imports etc, why not just use codesandbox instead?
while the virtuoso
tutorial is easily understandable
the virtuoso mesasge list
is a mix of javascript
and .tsx
?
from react-virtuoso.
I'm sorry for wasting your time. It looks like the product and my suggestions do not work for you. Good luck finding a solution that fits your requirements.
from react-virtuoso.
Related Issues (20)
- EndReached is not called when the height of the container is greater than the total height of the loaded items HOT 1
- [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
- 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 HOT 1
- [BUG] Simple header breaks restore state location HOT 2
- [BUG] When used in MUI's Tooltip component, extra white space will appear.
- Chrome52 is not compatible HOT 1
- [BUG] Grid jittering/flickering HOT 1
- [BUG] VirtuosoGrid - endReached doesn't call if data set is less then the container
- Drag the scrolllbar makes the grid blink in Firefox, but not in Chromium or Edge... HOT 1
- [BUG] react-beautiful-dnd + useWindowScroll HOT 1
- [BUG] followOutput doesn't scroll to bottom HOT 2
- [BUG] element disappearing when reverse scrolling in the ios HOT 2
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.