Using react-bootstrap with React-Form
See original GitHub issueam trying to use “redux-form”: “^6.7.0” with “react-bootstrap”: “^0.31.0”
I have added the Field to the form as follows:
class Config extends Component {
render() {
const { ServerPort, UserID, PortNumber, WWWUrl, SourcePath, FMEPath, pickFile, pickFolder, handleSubmit } = this.props;
return (
<Form horizontal onSubmit={handleSubmit}>
<FormGroup controlId="serverPortBox">
<Col componentClass={ControlLabel} sm={2}>Watson Port:</Col>
<Col sm={10}>
<OverlayTrigger placement="left" overlay={(<Tooltip id="tt1">TCP port for Watson to use</Tooltip>)}>
<Field name="WatsonPort" component={FormControl}
type="number" min="1024" max="65535" placeholder={ServerPort} />
</OverlayTrigger>
</Col>
</FormGroup>
but I am getting the warning:
Warning: Unknown props `input`, `meta` on <input> tag. Remove these props from the element.
in input (created by FormControl)
in FormControl (created by ConnectedField)
in ConnectedField (created by Connect(ConnectedField))
in Connect(ConnectedField) (created by Field)
If I change the Field to not use an JS Object for the component, I do not get the warning, but I also do not see the FormControl appearing.
<Field name="WatsonPort" component="FormControl" type="number" min="1024" max="65535" placeholder={ServerPort} />
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
Forms - React-Bootstrap
The <FormControl> component renders a form control with Bootstrap styling. The <FormGroup> component wraps a form control with proper spacing, ...
Read more >React-Bootstrap Form Component - GeeksforGeeks
React -Bootstrap is a front-end framework that was designed keeping react in mind. Form Component provides a way to make a form and...
Read more >How To: Create A Form in React Using Bootstrap - DEV ...
Install node package React Bootstrap. · Create a React component file called 'Form. · Build out your React Form component structure (either ...
Read more >Create Form UI using React-Bootstrap
Create Form UI using React-Bootstrap · Create a simple React Form UI using Bootstrap and React, visit here. · Prevents any default events...
Read more >React Bootstrap Forms: Simple and Multi-Step Forms
import React, { Component } from 'react'; import Container from 'react-bootstrap/Container'; import Form from 'react-bootstrap/Form'; class ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, this is a great mystery. I followed the advice in https://github.com/react-bootstrap/react-bootstrap/issues/2210 and both the warning about additional props and the empty submit stopped.
And it seems you have to wrap the Bootstrap in your custom component (why?) , except for one odd thing. When the mouse enters the field the first time, and the field gets selected, then I can press one key, and then field looses the selected state. If I reselect, and continue typing it works fine. It is only the first key press that causes the loss of “selected” or is it focus?
Update and then I tried converting the component to a stateless functional component, and moved the FieldInput of there, and put it in as an independent SFC. And now it select and focus work fine.
Go figure.
and I invoke it like this:
see also: https://github.com/erikras/redux-form/issues/1750
So now, the definition of FieldInput and Config look like this:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.