JedWatson / JedWatson/react-select

`onInputChange` documentation does not reflect behavior

Open
#5,677 3 comments 1 reaction 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

Documentation of the onInputChange return type does not reflect its actual return type, and what can be done with it

In the doc, return type is void
image

But while implementing my use-case, I found out that this is actually possible using the return type of this same method, for example here. This is also shown in this example in this same repository.

It seems to me that the documentation should be aligned with the real return value of this method, which is string | undefined AFAIK

WDYT? If you agree with this, I am eager to create a PR for it.

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

Compare the documented onInputChange return type with the behavior shown in storybook/stories/OnSelectKeepsInput.stories.tsx and the linked example.js. Locate the relevant API documentation, align its return description with the demonstrated value, and verify that the documentation accurately explains what callers can use.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.