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

Expose Option for import #2096

Closed
bebepeng opened this issue Oct 25, 2017 · 3 comments
Closed

Expose Option for import #2096

bebepeng opened this issue Oct 25, 2017 · 3 comments

Comments

@bebepeng
Copy link

Hi!
Would it be possible to expose the base Option in the index.js? I would like to be able to use the internal Option since i dont have a usecase for customizing the handleMouseDown, handleMouseEnter, and handleMouseMove methods. I see that the base Option already take children.

I would like to be able to do something like this...

<Select
      ...
      optionComponent={MyExtendedOption}
 />
const MyExtendedOption = (props) => {
    return (
        <Option {...props}>
            <div>{props.value.label.extracustomstuff}</div>
            <OTHERCOMPONENT/>
        </Option>
    );
};

This is similar to how one might use the exported "Value" component currently.

If you are open to pull request, I could also create one. Thanks!

@jperkelens
Copy link

I happened to be working on opening this issue with a PR when you submitted it, I think this is what you were asking for.

@tsteele2013
Copy link

I'm currently on the roadmap to V2 migration, but any way to enable this in V1?

@bladey
Copy link
Contributor

bladey commented May 28, 2020

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version.

If you aren't using the latest version of react-select please consider upgrading to see if it resolves any issues you're having.

However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you!

@bladey bladey closed this as completed May 28, 2020
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

No branches or pull requests

4 participants