appbaseio / appbaseio/reactivesearch

MultiList can't use customQuery with empty defaultValue

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

説明

**Affected Projects**
React

**Library Version:** x.y.z
```
"@appbaseio/reactivecore": "^9.0.3",
"@appbaseio/reactivesearch": "^3.2.4",
```

**Describe the bug**
`MultiList` with a `customQuery` never calls custom query when default value is an empty array.

**To Reproduce**
```jsx
{
if (value.length) {
return { query: { terms: { [props.dataField]: value } } };
}

return { query: { bool: must_not: { term: { [props.dataField]: 'comment' } } };
}}
/>
```

Steps to reproduce the behavior:

**Expected behavior**
Default query excludes type = comment documents.

**Additional context**
This is caused by the MultiList component constructor not calling setValue and thus not calling updateQuery when the default value is empty.

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

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

評価

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

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

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