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

Bug Report: Mismatch between Function Titles and Descriptions in Documentation #5962

Open
MisterCommit opened this issue Sep 19, 2024 · 1 comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet

Comments

@MisterCommit
Copy link

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.

@MisterCommit MisterCommit added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label Sep 19, 2024
@Methuselah96
Copy link
Collaborator

The description for each prop comes under the prop name, not above it, does that clear it up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet
Projects
None yet
Development

No branches or pull requests

2 participants