-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored EventTable to reduce and speed up rendering updates
- Loading branch information
Showing
11 changed files
with
230 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/EventLogExpert.UI/Store/EventTable/EventTableEffects.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// // Copyright (c) Microsoft Corporation. | ||
// // Licensed under the MIT License. | ||
|
||
using Fluxor; | ||
|
||
namespace EventLogExpert.UI.Store.EventTable; | ||
|
||
public sealed class EventTableEffects(IState<EventTableState> eventTableState) | ||
{ | ||
[EffectMethod(typeof(EventTableAction.UpdateDisplayedEvents))] | ||
public Task HandleUpdateDisplayedEvents(IDispatcher dispatcher) | ||
{ | ||
if (eventTableState.Value.EventTables.Any(table => table.IsLoading)) | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
|
||
dispatcher.Dispatch(new EventTableAction.UpdateCombinedEvents()); | ||
|
||
return Task.CompletedTask; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.