I have Blazor component with button. Clicking the button calls the method SetLastDate().
private string? LastDate { get; set; } protected override void OnInitialized() { LastDate = lcService.GetLastDate(Uid); } void SetLastDate() { lcService.SetDate(Uid) OnInitialized(); }Everything is working. But how correct is it to call the OnInitialized() method inside another method If I need to update the UI with new values and styles?
Do this inside the OnParametersSet method, but the point is that no parameters are changed (im just clicking the button with void func) and this method is not invoked.