appbaseio / appbaseio/reactivesearch

Allow ReactiveList to optionally render a sort label when using sortOptions

Offen
#1,645 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**
React

**Is your feature request related to a problem? Please describe.**
In our current application we make use of the ReactiveList sorting however this only produces the select dropdown and has no way to tap into the render process to add a custom label (i.e. Material UI Typography) named "Sort By".

**Describe the solution you'd like**
A few options would work. Simple option is to add a `renderSortLabel` prop which render the custom label and this is then referenced in the `renderSortOptions` function and if set renders the label before the select.

Or have a prop named `showSortLabel` that renders a default "Sort By" label.

Alternative option could be to replicate that of the `renderResultStats` function where a custom render function is passed in as a prop and would handles the complete generation of the sort although this does is make it a lot more complex due to the handleSortChange handler.

**Describe alternatives you've considered**
Will start looking the `innerClass` to see if it is possible to tap into the `sortOptions` this and use the ::before pseudo-element.

**Additional context**

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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