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.

Get Field Component via refs

See original GitHub issue

Are you submitting a bug report or a feature request?

feature request

What is the current behavior?

There is no a way to get Field components via refs.

What is the expected behavior?

Access to the rendered component in a Field <Field {....} component={MyCustomField} />.

What’s your environment?

  • final-form": “^4.2.0”
  • react-final-form": "^3.1.0

Other information

I am using this library in a React Native App, so the behavior that I would like to implement is this: Focus a field when clicking on “Next” key in the virtual keyboard on iOS.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:21
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

16reactions
erickjthcommented, Nov 21, 2018

Would be nice to have the official Forwarding Refs API implemented in each component to pass down the reference.

3reactions
erikrascommented, May 27, 2020

Published fix in v6.5.0.

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 >
Get the value of an Input field using a Ref in React | bobbyhadz
To get the value of an input field using a ref in React, set the `ref` prop on the input element. Access the...
Read more >
How to get values from input types using this.refs in reactjs?
1. using ref={ inputRef => this.input = inputRef } · 2. this.name.current.focusTextInput()
Read more >
Understanding refs in Vue - LogRocket Blog
Refs are Vue.js instance properties used to register a reference to HTML elements or child elements in the template of your application.
Read more >
Template Refs - Vue.js
It allows us to obtain a direct reference to a specific DOM element or child component instance after it's mounted. This may be...
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