reactivesearch icon indicating copy to clipboard operation
reactivesearch copied to clipboard

renderSortOptions in <ReactiveList /> available

Open kud opened this issue 6 years ago • 4 comments

Like renderResultStats or renderNoResults, make renderSortOptions for customisation.

https://github.com/appbaseio/reactivesearch/blob/next/packages/web/src/components/result/ReactiveList.js#L616

kud avatar Jul 19 '19 16:07 kud

Hey @kud This sounds good. Open to accept PRs on this. :)

jyash97 avatar Jul 23 '19 13:07 jyash97

Hey, I would like to work on this

kvin97 avatar Oct 03 '19 12:10 kvin97

Sure you can work on this 👍

jyash97 avatar Oct 03 '19 12:10 jyash97

Hey @kud @jyash97 Need to clear some points. renderNoResults and renderSortOptions are written in similar manner, and render to the dom as follows.

.......{this.props.sortOptions ? this.renderSortOptions() : null} {!this.props.isLoading && !error && filteredResults.length === 0? this.renderNoResults(): null}......

renderResultStats is implemented with conditional rendering using if/else statements.

It seems that renderSortOptions is not so different from renderResultStats or renderNoResults.

Therefore, need to clear the following 2 questions.

  1. What kind of customization is needed for renderSortOptions?
  2. What kind of output should be given with renderSortOptions,once the customization is done?

kvin97 avatar Oct 13 '19 07:10 kvin97