Skip to content

Expose Option for import #2096

@bebepeng

Description

@bebepeng

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions