appbaseio / appbaseio/reactivesearch
Controlled DataSearch autosuggestions not debounced
- 主要言語
- JavaScript
- スター
- 4.9k
- フォーク
- 478
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
**Affected Projects**
React
**Library Version:** 3.x
**Describe the bug**
When you use a `` as a controlled component with `value` and `onValueChange` props the `componentDidUpdate` method calls `setValue` with `isDefaultValue=true`.
This means de-bouncing is ignored for the autosuggest query and causes the interface to be slow and places extra load on Elasticsearch.
Changing the `isDefaultValue` value to false in the `componentDidUpdate` method fixes the issue for me. I'm not sure how this parameter is used as it is explicitly set to `true` everywhere it is called inside `DataSearch`. The debounced key handler is only ever used if it is passed to `setValue` as `false`.
**Expected behavior**
When using `` as a controlled component, autosuggest queries should be debounced according to the value set on the `debounce` prop.
コントリビューションガイド
評価
この issue はまだ評価されていません。