Skip to content

Commit

Permalink
Removed IStateSelection to account for Live Logging adding a new Sour…
Browse files Browse the repository at this point in the history
…ce or Task
  • Loading branch information
jschick04 committed May 23, 2023
1 parent f3f89aa commit 18bcf53
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/EventLogExpert/Components/FilterPane.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

using EventLogExpert.Library.Models;
using EventLogExpert.Store.FilterPane;
using Fluxor;
using Microsoft.AspNetCore.Components;

namespace EventLogExpert.Components;

Expand All @@ -16,23 +14,17 @@ public partial class FilterPane

private bool _expandMenu;

[Inject] private IStateSelection<AvailableFilterState, FilterDateModel> AvailableFilterDates { get; set; } = null!;

private string MenuState => _expandMenu.ToString().ToLower();

protected override void OnInitialized()
{
AvailableFilterDates.Select(x => x.EventDateRange);

AvailableFilterDates.SelectedValueChanged += (sender, args) =>
AvailableFilterState.StateChanged += (sender, args) =>
{
_availableRange = AvailableFilterState.Value.EventDateRange;
ResetDateModel();
ApplyDateFilter();
};

// Temp: Will reuse this to trigger filters to run anytime a new event log is loaded
//AvailableFilterState.StateChanged += (sender, args) => { ResetDateFilter(); };
SettingsState.StateChanged += (sender, args) => { ResetDateModel(); };

base.OnInitialized();
Expand Down

0 comments on commit 18bcf53

Please sign in to comment.