-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HxNamedViewList] Adding Parametr "SelectedNamedView" to "HxNamedViewList". #727
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoseTheChamp @crdo The highlighting feature has been implemented correctly; however, it's evident that the "named views feature" requires a more extensive overhaul. It hasn't been extensively utilized in our projects so far, which explains the lack of refinement.
I'll assume responsibility and get the feature ready for our use.
public partial class HxNamedViewList<TFilterModel> | ||
{ | ||
[Parameter] public IEnumerable<NamedView<TFilterModel>> NamedViews { get; set; } | ||
[Parameter] public NamedView<TFilterModel> SelectedNamedView { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot have SelectedNameView
and OnNamedViewSelected
parameters as their form a pair for data-binding a thus we have to introduce a breaking-change and consolidate the pair to:
[Parameter] public NamedView<TFilterModel> SelectedNamedView { get; set; }
[Parameter] public EventCallback<NamedView<TFilterModel>> SelectedNamedViewChanged { get; set; }
The original OnNamedViewSelected
has to be marked as [Obsolete]
and will be removed in the future.
await gridComponent.RefreshDataAsync(); | ||
protected async Task NamedViewSelected(NamedView<FilterModelDto> namedView) | ||
{ | ||
filterModel = namedView.Filter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the Filter()
method which is part of the current implementation, it is obvious that the whole "Named Views feature" needs a wide consolidation (incl. breaking-changes).
included in #731 |
This change aim to style selected item from the dropdown in HxNamedViewList.