Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styled options #380

Merged
merged 3 commits into from
Aug 24, 2015
Merged

Styled options #380

merged 3 commits into from
Aug 24, 2015

Conversation

bruderstein
Copy link
Collaborator

This is to address #290, adding className and style support to the options objects.

Obviously, you can now do this with the renderers or custom components, however, I wanted to have the option that the default components support it. I'm entirely agnostic about this - on the one hand it would be better to keep stuff like this up to custom renderers, on the other hand, it'd be nice that the defaults do some basics like this.

I've added title support too, to address #273

Just to reiterate, I really am agnostic about this - this was a quick fix that if thrown away, really doesn't matter. I'm just trying to clear some older issues. Either, this is merged and #290 and #273 can be closed, or this is not merged, and #290 and #273 can be closed because it can be done via the custom component props. - Either way, 2 issues down 😄

Using the default optionRenderer, specifying `style` or
`className` means the style/class  gets applied at the same
level as `.Select-option`

Closes JedWatson#44
Previous commit was just for the menu, this adds the same styling info
to the option once it's selected
This is similar to `className` and `style` properties of the option, in that
`title` can also be set from the option itself

Fixes JedWatson#273
@JedWatson
Copy link
Owner

Two more issues, and one PR, closed 😀

I think this is a good change - there are two ways to achieve it, but this is much lighter weight if it's all you want to customise. Let's go with it.

JedWatson added a commit that referenced this pull request Aug 24, 2015
@JedWatson JedWatson merged commit 49da891 into JedWatson:master Aug 24, 2015
@amit1911
Copy link

it would be good to add this to the documentation.

@maxtotheguenther
Copy link

@bruderstein i ran into the same problem. I need an optional field for each option field. Beside value and label i need for example an optionalData Object. Is there an approach or rather a best practice for my problem? #2807

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants