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.

pass through `id` prop

See original GitHub issue

just as className is appended to the class name of the rendered element, the passed in id attr should be used as the id for the rendered element.

This will allow <Select> components to work with the alternative label form, e.g.

<label htmlFor='my_input'>my input</label>
<Select id='my_input' {...props} />

Issue Analytics

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

github_iconTop GitHub Comments

13reactions
ItsTarikcommented, Mar 8, 2019

in version >= 2 to set the id on the Select use <Select inputId="foo" />.

1reaction
bandersoncommented, Aug 30, 2016

I just noticed there’s an inputProps prop which allows you to set the id on the input itself. Can you try that out?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pass id as props in react-router-dom - Stack Overflow
When I go to the next url img / 2, the router sends me the right page, but the id is not present...
Read more >
Special Props Warning - React
Special Props Warning ... Most props on a JSX element are passed on to the component, however, there are two special props (...
Read more >
Passing ID vs. Entity as props in React | by Marco - Medium
Passing props between components is inevitable when writing React applications. But have you ever wonder: Should the parent component pass ...
Read more >
Prop Id Cards - Etsy
Check out our prop id cards selection for the very best in unique or ... 4 News Press Pass, ID Badge, Name Tag...
Read more >
How to Pass Props Through React Router's Link Component
In this up-to-date post, you'll learn how to pass data through React Router's Link component to a new route.
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