New to Telerik UI for Blazor? Download Free 30-day trial
Chat - Endless Scrolling
- EXAMPLE
- VIEW SOURCE
- EDIT IN TELERIK REPL
- Change Theme
default
ChatStartIndex: 84ChatEndIndex: 100ChatTotal: 100
- Endless-scrolling.razor
- Author.cs
- Message.cs
Loading the demo source code...please wait.
Description
The Telerik Chat component for Blazor supports endless scrolling that enables the app to load messages on demand as the user scrolls. The feature reduces the number of rendered messages and improves the performance.
Chat endless scrolling has two modes of configuration and operation. In the simpler case, you only need to set ScrollMode="@ChatScrollMode.Endless" and provide all messages in the Data parameter. If the number of messages is huge, the component can request them in chunks. In this case, the endless scrolling depends on several events and parameters:
OnLoadMoreMessageseventOnReferencedMessageClickeventPinnedMessagesparameterRepliedToMessagesparameterScrollModeparameterPageSizeparameterStartIndexparameterEndIndexparameterTotalparameter
This Blazor Chat Endless Scrolling example is part of a unique collection of hundreds of Blazor demos, with which you can see all Telerik UI for Blazor components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for Blazor or ThemeBuilder.