Skip to content

Dataviews: "elements" property of field items should be a subproperty of "filterBy" #64635

@juanmaguitar

Description

@juanmaguitar

What problem does this address?

The elements property and the filterBy property of Dataviews are tightly coupled. In fact, filters are enabled by a field just by passing a proper array of objects to the elements property even when filterBy is empty. From a Developer Experience point of view, I think this is a bit confusing.

What is your proposed solution?

I think it makes more sense for the elements property to be a sub-property of filterBy so it's more naturally understandable that:

  • Filters by a field are "enabled" when the property elements property of filterBy, receives an array of value-label objects
  • Optionally, we can also define operators and isPrimary values

In the meantime, I opened #64633 to clarify this from the docs

cc: @oandregal

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Package] DataViews/packages/dataviews[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions