Fix sort order on init and movements to fix sort behavior
This commit is contained in:
parent
05826ef9e7
commit
0c532de7e2
1 changed files with 5 additions and 0 deletions
|
@ -39,6 +39,7 @@
|
|||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
OrderedActions = Actions.OrderBy(a => a.SortOrder).ToList();
|
||||
FixSortOrder();
|
||||
}
|
||||
|
||||
private void AddAction()
|
||||
|
@ -62,12 +63,16 @@
|
|||
{
|
||||
if (action.SortOrder > 0)
|
||||
OrderedActions.Move(action, action.SortOrder - 1);
|
||||
|
||||
FixSortOrder();
|
||||
}
|
||||
|
||||
private void MoveDown(Data.Models.Action action)
|
||||
{
|
||||
if (action.SortOrder < OrderedActions.Count + 1)
|
||||
OrderedActions.Move(action, action.SortOrder + 1);
|
||||
|
||||
FixSortOrder();
|
||||
}
|
||||
|
||||
private async void BrowseForActionPath(Data.Models.Action action)
|
||||
|
|
Loading…
Add table
Reference in a new issue