Reactivesearch: Add support for renderListItem

Created on 28 Feb 2018  路  1Comment  路  Source: appbaseio/reactivesearch

Issue Type:

Enhancement

Platform:

Web

Description:

Add a renderListItem(label, count) prop support for Single/MultiDropdown/List components. Ref - https://github.com/appbaseio/reactivesearch/commit/bfacb42202032fd37c0157b294ffd2c199e360a7

enhancement web

Most helpful comment

This will be available in the upcoming release v2.3.2. Allows rendering your own custom list.

  • renderListItem Function [optional]
    customize the rendered list via a function which receives the item label and count and expects a JSX or String back. For example:
renderListItem={(label, count) => (
    <div>
        {label}
        <span style={{ marginLeft: 5, color: 'dodgerblue' }}>
            {count}
        </span>
    </div>
)}

cc @davidklebanoff

>All comments

This will be available in the upcoming release v2.3.2. Allows rendering your own custom list.

  • renderListItem Function [optional]
    customize the rendered list via a function which receives the item label and count and expects a JSX or String back. For example:
renderListItem={(label, count) => (
    <div>
        {label}
        <span style={{ marginLeft: 5, color: 'dodgerblue' }}>
            {count}
        </span>
    </div>
)}

cc @davidklebanoff

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidklebanoff picture davidklebanoff  路  4Comments

jkhaui picture jkhaui  路  3Comments

mihalo picture mihalo  路  4Comments

ymzoughi picture ymzoughi  路  4Comments

carlopascual picture carlopascual  路  3Comments