-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WatchList.MudBlazor - Add "FilterModel" and used it in the project.
- Loading branch information
1 parent
49320d7
commit f1b2ef8
Showing
6 changed files
with
90 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Collections.ObjectModel; | ||
using Microsoft.AspNetCore.Components; | ||
using WatchList.Core.Model.Filter; | ||
using WatchList.Core.Model.Filter.Components; | ||
|
||
namespace WatchList.MudBlazors.Model | ||
{ | ||
public class FilterModel | ||
{ | ||
public ObservableCollection<TypeFilter> TypeItem { get; set; } = new ObservableCollection<TypeFilter>(TypeFilter.List); | ||
|
||
public ObservableCollection<StatusFilter> StatusItem { get; set; } = new ObservableCollection<StatusFilter>(StatusFilter.List); | ||
|
||
[Parameter] | ||
public TypeFilter Type { get; set; } = TypeFilter.AllCinema; | ||
|
||
[Parameter] | ||
public StatusFilter Status { get; set; } = StatusFilter.AllCinema; | ||
|
||
public FilterItem GetFilter() => new FilterItem(Type, Status); | ||
|
||
public void Clear() | ||
{ | ||
Type = TypeFilter.AllCinema; | ||
Status = StatusFilter.AllCinema; | ||
} | ||
} | ||
} |
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,16 @@ | ||
using System.Collections.ObjectModel; | ||
using WatchList.Core.Model.Sorting; | ||
|
||
namespace WatchList.MudBlazors.Model | ||
{ | ||
public class SortModel | ||
{ | ||
public ObservableCollection<SortField> Items { get; set; } = new ObservableCollection<SortField>(SortField.List); | ||
|
||
public SortField Type { get; set; } = SortField.Title; | ||
|
||
public SortField GetSortItem() => Type; | ||
|
||
public void Clear() => Type = SortField.Title; | ||
} | ||
} |
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
Binary file not shown.
Binary file not shown.