JedWatson / JedWatson/react-select
Bug Report: Mismatch between Function Titles and Descriptions in Documentation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
https://react-select.com/props#select-props
Bug Report: Mismatch between Function Titles and Descriptions in Documentation
Description
There appears to be a mismatch between the function titles and their descriptions in the documentation. Specifically, the titles and descriptions for event handler functions are inconsistent, which may lead to confusion for developers integrating react-select into their projects.
Steps to Reproduce
- Refer to the documentation of event handler functions like
onKeyDown,onMenuOpen, andonMenuClose. - The descriptions don't align with what the functions actually do. For example, the
onKeyDownfunction description mentions handling change events, whereas it should refer to handling key down events.
Expected Behavior
The function descriptions should correctly reflect their behavior. For example:
onKeyDownshould be described as "Handle key down events on the input."onMenuOpenshould have a clear description that explains its function behavior related to menu opening.onMenuCloseshould describe the action of closing the menu correctly.
Actual Behavior
- The
onKeyDowndescription refers to handling change events, which is misleading. - The descriptions of other functions may not accurately explain their behavior either.
Test Case
This issue is present in the documentation. A specific code example may not be necessary, but reviewing the relevant documentation for accuracy should suffice.
Versions
react-select: v5 (Latest)
Additional Notes
Providing accurate documentation helps developers better understand how to integrate and use these event handler functions in their projects. This small fix could prevent confusion and enhance the developer experience with react-select.
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
Review the event-handler entries under the Select props documentation at https://react-select.com/props#select-props, starting with onKeyDown, onMenuOpen, and onMenuClose. Correct descriptions so they accurately explain each handler's behavior, then verify the rendered documentation no longer mismatches the function titles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100