Skip to content

DataFilter Range problems #6730

@LiveFreeAndRoam

Description

@LiveFreeAndRoam

Slider and Position of Range Labels

The range boundary values are rendered inline with the slider control (see image). When those numbers become large, the slider control becomes very compressed, to the point it is difficult to use.

This is the current slider control with boundary values rendered inline:

image

When range values become large, it would be better if the range appeared under the control. Perhaps a property something like: {range: { labelAlign: "[top|bottom|inline]" }}. E.g. if it were aligned to the bottom, it might look something like this:

image

Floating Point

The slider displays floating point values when the range is not evenly divisible by 20.

image

Step size

The step size is currently hardcoded to be (max-min)/20. With 5000 items, the slider granularity is 250. Worst case, my min is 250 below and max 250 above where I want to filter. i.e. it means I have a range of 500 items that I'm filtering.

The step-size (or number of steps) needs to be made a property so I have control over the granularity of slider steps.

When the range is fewer than 20, the step size should become 1.

Control the type of filter

The type of filter is determined by the data type and there is no way to override that.

When the data set contains numbers, the DataFilter only provides a Range selector. However, if the range is very small, (maybe just 5 items or fewer), I'd rather display it as a Select list or CheckBoxGroup.

Perhaps add a property to allow the user to set filterType="RangeSelector|CheckBoxGroup|SelectMultiple"

Filter Range Excludes boundary values

The filter boundary values are exclusive, when they should be inclusive. E.g. filter 0-3, the filter omits 0 and 3. This actually makes it impossible to filter only on the min value (e.g. 0) or the max value.

The only workaround to this is to have the filter display values beyond the dataset. E.g. to filter for items with a value of 0, I need to configure the {min: -1, max: 1}. Meanwhile, negative values are not permitted in my dataset, so this is a hack to workaround the exclusive behavior.

There is also greater cognitive load required to mentally calculate values either side of the actual range to be filtered, rather than just displaying all the values to be filtered.

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions