appbaseio / appbaseio/reactivesearch

Allow ReactiveList to optionally render a sort label when using sortOptions

オープン
#1,645 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
JavaScript
スター
4.9k
フォーク
478
PR マージ指標
30日以内にマージされた PR はありません

説明

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

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

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

評価

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

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

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