Skip to content

DataSort and DataFilters - determine a reasonable default behavior #7063

@jcfilben

Description

@jcfilben

Having both DataSort and DataFilters results in some strange behavior. After selecting ‘sort by’ and ‘sort direction’ those fields show up in DataFilters. It feels like they should not show up in DataFilters.

This behavior is coming from https://github.com/grommet/grommet/blob/master/src/js/components/DataFilters/DataFilters.js#L110-L112
If DataFilters doesn't have children and view.sort is defined, DataFilters will include DataSort within.

What is the 80% case when using DataSort. Do we expect it should be within DataFilters or a separate control?

URL, screen shot, or Codepen exhibiting the issue

Dec-13-2023.10-21-02.mp4

Steps to Reproduce

  1. https://storybook.grommet.io/?path=/story/data-data-properties--properties
  2. Notice the DataFilters drop initially only shows a location filter
  3. Open the DataSort drop and select a property to sort by and a direction
  4. Open the DataFilters drop. Notice the drop content now includes DataSort.

Metadata

Metadata

Assignees

Labels

Data and friendsFor data components in grommetbugissue that does not match design or documentation and requires code changes to address

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions