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.

Add `ref` and `searchRef` props

See original GitHub issue

The picker seems to have a ref prop but it references the react component instead of the DOM component as expected.

Furthermore it would be really nice to export the search input ref as a searchRef prop.

In my case I want this so I can focus the search input on command (autoFocus doesn’t suffice my use-case and I need more control)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:5

github_iconTop GitHub Comments

1reaction
jshefferscommented, Apr 17, 2020

FYI @jonahparampara. I was able to achieve what I wanted by creating a simple wrapping div and applying the ref to it. Not sure if that helps in your case.

0reactions
arclogos132commented, Jun 20, 2022

Any update on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refs and the DOM - React
Refs provide a way to access DOM nodes or React elements created in the render method. In the typical React dataflow, props are...
Read more >
A complete guide to React refs - LogRocket Blog
First, let's start with a simple component and grab a node element using refs. import React from "react"; const ActionButton = ({ label,...
Read more >
Is it possible to add ref to the props.children elements?
Form component will act as wrapper component here and Field component ref are not being set here. I want iterate through props.children in ......
Read more >
The Complete Guide to useRef() and Refs in React
References can also access DOM elements. Assign the reference to ref attribute of the element you'd like to access: <div ref={reference}>Element ...
Read more >
Working with refs in React | CSS-Tricks
We created a ref by setting the ref prop of the input field to textInput . That gives us access to the value...
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