You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike the regular ones, the sticky custom components are persistently visible in the viewport, making them suitable for displaying custom UI (like pinned messages, for example). Their size is getting measured, so that the first/last messages are not obscured by them.
By default, the sticky header and footer will offset the list content. In some cases, we would like to avoid that - for example, the scroll to bottom button should not leave space below the messages. To achieve that, we can wrap the content with a `position: absolute` container.
Copy file name to clipboardexpand all lines: apps/virtuoso.dev/docs/guides/virtuoso-message-list/working-with-data.md
+11
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ The Message List component exposes an imperative API to interact with the list d
15
15
Use this method when you need to add additional messages before the current ones, for example when loading older messages. The component will automatically adjust the scroll position to keep the previous messages in view.
@@ -112,6 +116,8 @@ To see a `data.map` example usage, visit the [Reactions example](/virtuoso-messa
112
116
The `data.findAndDelete(predicate: (item: Data) => boolean)` method lets you remove a message from the list. The predicate function receives the data item and should return a boolean value indicating whether the item should be removed. The example below adds a button next to each item that removes it.
@@ -179,6 +188,8 @@ In case you're building a chat application with multiple channels, you might wan
179
188
The method accepts `data` and, optionally, an `options: { initalLocation: ItemLocation, purgeItemSizes?: boolean }` to specify the initial scroll position and weather to clear the cached item sizes. Purging the item sizes is useful when the new data has different item sizes than the previous data.
0 commit comments