fluentui-blazor icon indicating copy to clipboard operation
fluentui-blazor copied to clipboard

[Data Filter] New Component

Open franklupo opened this issue 1 year ago • 7 comments

Hello everyone,

After 3 weeks of work I am happy to present the FluentDataFilter component. I have analyzed DevExpress, Telerik, SyncFusion, MudBlazor, Radzen, PowerApps and I think I have taken the best of everything.

No library for Linq has been included, everything is solved with expressions created at runtime. Eg. Radzen use https://dynamic-linq.net.

Features:

  • Conditions based on type
  • Creation of groups
  • Association to properties or fields
  • Logical operators And/Or/NotAnd/NotOr
  • Condition operator "In/NotIn" selects from data and populates a list for selection
  • FluenDataFilterManager component to manage filters eg. in grid
  • DataFilterHelper creation of expressions to be used with linq

I know the documentation is incomplete and the tests are totally missing.

I wanted to share my idea and continue the development with your suggestions

image

image

Enm data

image

Condition

image

Editor

image

Operator In

image

image

image

Cutom Editor Vakue

image

Nullable value

image

Manager filter

image

image

image

image

Withe box filter image

franklupo avatar Jul 13 '24 14:07 franklupo

@franklupo please hold work on this until we've taken a closer look at this.

Both Denis and my first impression of this was that we doubt whether this should be functionality offered by the library. This is not a disqualification, just give us time to properly assess.

vnbaaij avatar Jul 16 '24 21:07 vnbaaij

Let me explain the structure better

  • DataFilterCriteria<TItem> and DataFilterCriteriaCondition<TItem> are used to define the structure of the criteria. These can work without any components and generate expression.
  • FluentDataFilter<Item> is the component to manage the creation of criteria. It is configured with the FluentPropertyFilter<TItem> or FluentFieldFilter<TItem> filters.
  • FluentPropertyFilter<TItem> work with expression property
  • FluentFieldFilter<TItem> work with files name string. Is possible to specify path Item.SubItem.SubSubItem.
  • FilterBase<TItem> is a base for any filters.
  • FluentDataFilterManager<TItem> is the the filter manager.
  • DataFilterHelper and DataFilterPredicateBuilder are helper for genereting expression.

franklupo avatar Jul 17 '24 05:07 franklupo

After some research, I could only find Telerik, which offers a similar component: https://demos.telerik.com/blazor-ui/filter/overview

Can you give us links to the other libraries you're talking about? DevExpress, SyncFusion, MudBlazor, Radzen, PowerApps

dvoituron avatar Jul 17 '24 08:07 dvoituron

  • https://mudblazor.com/components/datagrid#filtering
  • https://demos.devexpress.com/ASPNetCore/Demo/DataGrid/FilterPanel
  • https://blazor.syncfusion.com/demos/query-builder/default-functionalities?theme=bootstrap5
  • https://blazor.radzen.com/datafilter
  • https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/create-edit-view-filters
  • https://www.blazor.zone/query-builder

franklupo avatar Jul 17 '24 11:07 franklupo

This component, like others, selecttree, treeview, overloads the standard library which should be composed of lightweight and basic components. Is creating a new library a good idea?

franklupo avatar Jul 17 '24 21:07 franklupo

Another similar component: https://github.com/manureini/MComponents/blob/master/MComponents/MQueryBuilder/MQueryBuilder.razor

agriffard avatar Jul 21 '24 12:07 agriffard

This component, like others, selecttree, treeview, overloads the standard library which should be composed of lightweight and basic components. Is creating a new library a good idea?

Yes, we think components like this are better suited to be in a separate package. For others, see the discussion in #2419 about just that.

vnbaaij avatar Jul 23 '24 12:07 vnbaaij

Closing this as there has been no activity for a while. As discussed, this could be delivered through an external package, not as part of the core library.

vnbaaij avatar Nov 19 '24 08:11 vnbaaij