React-select: lake of documentation for `optionComponent` and `optionRenderer`

Created on 14 Dec 2016  路  8Comments  路  Source: JedWatson/react-select

Hi,

I can saw in the documentation that we can customize options rendering with optionComponent and optionRenderer props but I can't figure out how they work.
Documentation is pretty light on the subject and I did not found any example in the issues / example / google.
Have you guys any example on how implementing custom option rendering like this capture :
capture d ecran 2016-12-14 a 11 06 40

Thanks a lot.

BTW, your work is AWESOME!

Most helpful comment

Well, I found an example with the Gravatar thing seems great for now.

All 8 comments

Well, I found an example with the Gravatar thing seems great for now.

Aha, I was looking for this, too. Many thanks for linking to the example! 馃憤

Is it still possible to find the example?
Wanna get it too, but /examples/ returns 404

CustomComponents example

The file has been moved to v1.x branch. @VladPoe

Any idea how to get the same result with react-select V2 ?
optionComponent is not available anymore
Thanks

@Natansab The prop optionsComponent was replaced by the Components framework in v2 which offers much more options to customize the Select component. The documentation should get you started.

Thank you @Rall3n! One thing that is not clearly explained in the doc, for the Components framework at least, is the ability to access the values through the data prop passed to thecomponents element. getValue() only returns the data of the selected value.

Well, the documentation at that point references the Props documentation. You can find all props that are being assigned to each of the components under the section Components.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Meesam picture Meesam  路  3Comments

steida picture steida  路  3Comments

x-yuri picture x-yuri  路  3Comments

yrabinov picture yrabinov  路  3Comments

MalcolmDwyer picture MalcolmDwyer  路  3Comments