Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

JoseTheChamp
Copy link
Contributor

This change aim to style selected item from the dropdown in HxNamedViewList.

@JoseTheChamp JoseTheChamp requested a review from crdo January 9, 2024 11:58
@JoseTheChamp JoseTheChamp changed the title [HxNamedViewList] Adding Parametr "SelectednamedView" to "HxNamedViewList". [HxNamedViewList] Adding Parametr "SelectedNamedView" to "HxNamedViewList". Jan 9, 2024
Copy link
Member

@hakenr hakenr left a 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.

Comment on lines 8 to 11
public partial class HxNamedViewList<TFilterModel>
{
[Parameter] public IEnumerable<NamedView<TFilterModel>> NamedViews { get; set; }
[Parameter] public NamedView<TFilterModel> SelectedNamedView { get; set; }
Copy link
Member

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();
Copy link
Member

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).

@hakenr hakenr self-assigned this Jan 11, 2024
@hakenr
Copy link
Member

hakenr commented Jan 12, 2024

included in #731

@hakenr hakenr closed this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants