private void UriHelper_OnLocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e) { foreach (var item in items) { SelectItem(item); } }
private void OnLocationChanged(object sender, LocationChangedEventArgs args) { // We could just re-render always, but for this component we know the // only relevant state change is to the _isActive property. var shouldBeActiveNow = ShouldMatch(args.Location); if (shouldBeActiveNow != _isActive) { _isActive = shouldBeActiveNow; _renderHandle.Render(Render); } }