Skip to content

Commit

Permalink
Update getting-started/web-app.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dimodi authored and dimodi committed Jan 30, 2024
1 parent c3a9b6f commit f83148c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion getting-started/web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Take into account the following notes when choosing the *Interactivity location*
* We recommend *global* interactivity location for easier setup and usage of the Telerik components.
* Most Telerik Blazor components require interactivity. They will not respond to user actions and the Blazor framework will not refresh their UI in static render mode. Telerik Blazor components with JavaScript rendering (Barcodes, Charts, Gauges, Maps, and QR Codes) will not render in static mode at all.
* The `Account` section in the Blazor Web App template with identity is static by design. Most Telerik Blazor components will not work in this section.
* The [`TelerikRootComponent` requires interactivity as well]({%slug rootcomponent-overview%}#net-8-notes). Normally, this component should be in a layout file. Layout files are interactive only if the *Interactivity location* is *Global*. If the *Interactivity location* is set to *Per page / component*, then there are three options:
* The [`TelerikRootComponent` requires interactivity as well]({%slug rootcomponent-overview%}#net-8-notes). Normally, this component should be in a layout file. Layout files are interactive only if the *Interactivity location* is *Global*. If the *Interactivity location* is set to *Per page / component*, then there are three options, which are demonstrated in this [.NET 8 Blazor Web App sample project on GitHub](https://github.com/telerik/blazor-ui/tree/master/rootcomponent/BlazorWebAppServer):
* Enable global interactivity at runtime when the user navigates to a page (component) with Telerik components inside. To do this, [set the `@rendermode` conditionally in `App.razor`](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#set-the-render-mode-by-component-instance). Blazor Web Apps with identity use the same approach to disable interactivity in the `Account` section.
* Add a `TelerikRootComponent` on all interactive `.razor` pages, instead of using it in the layout component. A possible side effect may be [wrong popup position]({%slug troubleshooting-general-issues%}#wrong-popup-position).
* Have a regular layout (`MainLayout.razor`) for static pages and one empty layout (`EmptyLayout.razor`) for interactive pages with Telerik components. Copy the contents for `MainLayout.razor` to a standard non-layout `.razor` file and use it to wrap the page-specific content. Replace `@Body` with `@ChildContent` in the copied layout content. This approach and code duplication require more effort to maintain, but avoids possible issues with popup position.
Expand Down

0 comments on commit f83148c

Please sign in to comment.