question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ref in inputProps breaks after updating to 3.3.2

See original GitHub issue

I need to get the ref of the typeahead’s input.

In 3.2.4 I used to get it with:

<AsyncTypeahead
  {...otherProps}
  inputProps={{ ref: this.inputRef }}
/>

After I’ve updated to 3.3.2, I’m getting this error: Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail..

What is the proper way to get the input ref?

Isn’t this a break change to bump only the minor version?

Thanks for the library.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jy2wongcommented, Feb 11, 2021

@lourenci @k7paul this might be fixed with https://github.com/DefinitelyTyped/DefinitelyTyped/pull/51176 ; if not you probably need to do the same thing for AsyncTypeahead as I did for Typeahead.

0reactions
ericgiocommented, May 16, 2020

@k7paul: It looks like the public methods aren’t present in the types. You or someone else will need to submit a PR adding them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

material-ui/core/CHANGELOG.md - UNPKG
We plan to add a deprecation for any breaking change in v5 that allows it. Each warning comes with a simple message that...
Read more >
Change Log - Ant Design
Fix Affix throws React warning of state update on unmounted component . ... #18900. Fix title and content of Alert not break line...
Read more >
uncaught error: cannot create styled-component for ... - You.com
When importing svg component and trying to style it, i've got error: ... external file, frontend allias export const SvgCircle = forwardRef((props, ref) ......
Read more >
react-number-format - NPM Package Overview - Socket - Socket.dev
Through npm npm install react-number-format --save. Or get compiled development and ... suffix, String (ex : /-), none, Add a suffix after the...
Read more >
CHANGELOG.md - TINMAN
This is a quick patch after an important regression with the Modal component. ... breaking changes have been done: The usage of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found