React-select: Allow using other icons not only arrow

Created on 27 Aug 2016  路  2Comments  路  Source: JedWatson/react-select

I need to use a magnifier instead of arrow at the right of select-input.
So i hid through css select Select-arrow then spend time to align
bootstrap icon instead of arrow ( fa fa-search fa-lg). It would be very useful if we can pass own class instead ofSelect-arrow`.

I want to start working on it, if it is possible.
Thank you

Most helpful comment

If anyone gets here via google, note that after v2.0.0, arrowRenderer no longer exists and instead you use "components" system to make this change.

See the "Dropdown Indicator" example at https://react-select.com/components#replaceable-components

All 2 comments

Added support via PR #1191. This can be done by specifying your own renderer (in a similar way as optionRenderer, menuRenderer, etc.):

function arrowRenderer () {
  return (
    <span>+</span>
  );
}

function render () {
  return (
    <Select
      arrowRenderer={arrowRenderer}
      {...otherProps}
    />
  );
}

If anyone gets here via google, note that after v2.0.0, arrowRenderer no longer exists and instead you use "components" system to make this change.

See the "Dropdown Indicator" example at https://react-select.com/components#replaceable-components

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steida picture steida  路  3Comments

coder-guy22296 picture coder-guy22296  路  3Comments

pablote picture pablote  路  3Comments

sampatbadhe picture sampatbadhe  路  3Comments

MalcolmDwyer picture MalcolmDwyer  路  3Comments