Skip to content

Commit

Permalink
fix: Flyout registration - prevents flyout registration being overwri…
Browse files Browse the repository at this point in the history
…tten
  • Loading branch information
nickrandolph committed Mar 30, 2023
1 parent 65f6485 commit 0320e5d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public static IServiceCollection AddNavigation(
var routes = createRouteRegistry?.Invoke(services) ?? new RouteRegistry(services);
routeBuilder?.Invoke(views, routes);

// Only fall back to the navigation flyout if one hasn't already been registered
services.AddTransient<Flyout, NavigationFlyout>();

return services
.AddSingleton<NavigationConfig>(sp =>
{
Expand All @@ -41,7 +44,6 @@ public static IServiceCollection AddNavigation(
.AddHostedService<BrowserAddressBarService>()
.AddScoped<Navigator>()

.AddTransient<Flyout, NavigationFlyout>()

// Register the region for each control type
.AddRegion<Frame, FrameNavigator>()
Expand Down

0 comments on commit 0320e5d

Please sign in to comment.