protected override async Task OnInitializedAsync() { callStateChange = async() => await OnStateChange.InvokeAsync(null); var categories = await CategoryDataService.LoadCategories(); CategoryFilters = categories.Select(c => new Filter <CategoryModel> { Model = c, IsVisible = !CalendarService.State.HiddenCategoryIDs.Contains(c.ID) }).ToList(); NoCategoryFilter = new Filter <int?> { IsVisible = !CalendarService.State.HiddenCategoryIDs.Contains(null), Model = null }; }
protected override async Task OnInitializedAsync() { Categories = await CategoryDataService.LoadCategories(); }