appbaseio / appbaseio/reactivesearch

Set script_fields in ReactiveList

Offen
#1,226 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
JavaScript
Sterne
4.9k
Forks
478
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Affected Projects**
ReactiveSearch Web 3.0.3

**Is your feature request related to a problem? Please describe.**
I'd like to include scripted values in the results returned on ReactiveList using the script_fields property

**Describe the solution you'd like**
Support script_fields in defaultQuery or another property on the component

**Additional context**
I tried returning script_fields in defaultQuery and it works, but only if you don't have a sort defined. Once you add a sort, it no longer shows up.

```
defaultQuery={() => {
return {
"script_fields": {
"foo": {
"script": {
"id": "my_script_id",
"params": {
"things": this.props.things
}
}
}
}
};
}}
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.