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.

Adding default value input type

See original GitHub issue

Hi, im having a problem by adding a default value on one of my input type

<Field component={component} placeholder={placeholder} value={this.state.price} /> the problem is the value didn’t pass to the component. When I try to display the value it is empty and nothing is in there.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

7reactions
Nopzencommented, May 4, 2017

As i recall its called defaultValue instead of value, hope it helps

1reaction
gustavohenkecommented, May 14, 2017

Closing in favor of the older, more upvoted #1964

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to define a default value for "input type=text" without ...
Here is the question: Is it possible that I can set the default value without using attribute value ? As I know, if...
Read more >
HTML input value Attribute - W3Schools
For "text", "password", and "hidden" - it defines the initial (default) value of the input field; For "checkbox", "radio", "image" - it defines...
Read more >
HTML | DOM Input Text defaultValue Property - GeeksforGeeks
The Input Text defaultValue Property in HTML DOM is used to set or return the default value of the Text Field. This property...
Read more >
How to Set a Default Value on "color" input HTML Element?
To set a default value on HTML <input type="color" /> element, you need to make sure it's in the correct format — i.e....
Read more >
Setting a default value for an Input element in React | bobbyhadz
Make sure you aren't setting the defaultValue prop on a controlled input field because setting both value and defaultValue props is not allowed....
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