react-select icon indicating copy to clipboard operation
react-select copied to clipboard

lake of documentation for `optionComponent` and `optionRenderer`

Open optyler opened this issue 9 years ago • 8 comments

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!

optyler avatar Dec 14 '16 10:12 optyler

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

optyler avatar Dec 14 '16 14:12 optyler

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

clarkritchie avatar Mar 13 '17 16:03 clarkritchie

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

VladPoe avatar Aug 23 '18 10:08 VladPoe

CustomComponents example

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

exiadb avatar Sep 13 '18 01:09 exiadb

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

Natansab avatar Jan 17 '19 09:01 Natansab

@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.

Rall3n avatar Jan 17 '19 10:01 Rall3n

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 the components element. getValue() only returns the data of the selected value.

Natansab avatar Jan 17 '19 10:01 Natansab

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.

Rall3n avatar Jan 17 '19 11:01 Rall3n