react-select icon indicating copy to clipboard operation
react-select copied to clipboard

`onInputChange` documentation does not reflect behavior

Open 7PH opened this issue 2 years ago • 3 comments

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.

7PH avatar Jun 15 '23 13:06 7PH

I faced the same problem

Yep, it should be aligned. @7PH, please make a PR

aerialist7 avatar Jun 22 '24 12:06 aerialist7

Wow, completly forgot about this, I'll check and see if that's a quick fix

7PH avatar Jun 23 '24 01:06 7PH

That's not a quick fix

  • Multiple locations need to account for the new type
  • The magical-types library used in this project omits the undefined from string | undefined

Unfortunately, I don't have the time at the moment to fix this now. I still think this is an issue and should be fixed, so I'll keep the issue open for now.

7PH avatar Jun 23 '24 20:06 7PH