appbaseio / appbaseio/reactivesearch

Do not apply pristine range filters

オープン
#1,059 コメント 5 件 リアクション 0 件 担当者 1 名 @ShahAnuj2610 が担当を希望しています GitHub で見る
bug enhancement
主要言語
JavaScript
スター
4.9k
フォーク
478
PR マージ指標
30日以内にマージされた PR はありません

説明

**Affected Projects**
React

**Library Version:** x.y.z
3.0.0-rc.20

**Describe the bug**
When filtering sparse data (i.e., when some of the attributes can be present, but may not be), you want filter components to only be applied when the user explicitly sets them.

For example: I work on a search app that filters by some date field, but that date field is only present in 40% of the documents. When I render the `RangeSlider` component, only items are shown that contain some value for the `dataField` attribute. This means that only documents are shown that have that specific date field.

This happens, because the `RangeSlider` applies a filter to the query with the `range` `start` and `end` values.

Ideally, this filter is only applied after the user interacts with the component. This could be fixed by adding a `pristine` state to `RangeSlider` and others, and only applies the filter when its value is false.

Perhaps this could be set as an optional prop, e.g. `ignoreUntouched`.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。