JedWatson / JedWatson/react-select

Bug Report: Mismatch between Function Titles and Descriptions in Documentation

Open
#5,962 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

image

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

  1. Refer to the documentation of event handler functions like onKeyDown, onMenuOpen, and onMenuClose.
  2. The descriptions don't align with what the functions actually do. For example, the onKeyDown function 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:

  • onKeyDown should be described as "Handle key down events on the input."
  • onMenuOpen should have a clear description that explains its function behavior related to menu opening.
  • onMenuClose should describe the action of closing the menu correctly.

Actual Behavior

  • The onKeyDown description 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.