JedWatson / JedWatson/react-select
[Bug] loadOptions is not passed to custom components
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
I'm customizing the components of react-select and I have a use case in which I'd like to know if the select element has been provided with a loadOptions function.
It should be possible to access the props of the customized component, and then the selectProps property, which should then give me all the props that have been passed to the react select. The loadOptions is missing in the list of properties that selectProps is returning.
Here is a repro demo: https://codesandbox.io/s/react-select-v3-sandbox-forked-yns2r?file=/example.js (check line 13)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox and inspect the customized component's props, especially selectProps, to confirm that loadOptions is absent. Trace where selectProps is assembled in react-select and identify the existing component or prop tests covering this behavior. Done means a customized component can observe the supplied loadOptions function and the regression is covered by a test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100