appbaseio / appbaseio/reactivesearch

MultiList can't use customQuery with empty defaultValue

Abierto
#1,402 5 comentarios 0 reacciones 1 asignado Reclamado por @ShahAnuj2610 Ver en GitHub
bug
Lenguaje dominante
JavaScript
Estrellas
4.9k
Forks
478
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.